mirror of
https://github.com/daledavies/jump.git
synced 2026-05-07 10:07:20 +02:00
Add and improve custom exception types for all cases
This commit is contained in:
@@ -13,11 +13,13 @@
|
||||
|
||||
namespace Jump\API;
|
||||
|
||||
use \Jump\Exceptions\APIException;
|
||||
|
||||
class Icon extends AbstractAPI {
|
||||
|
||||
public function get_output(): string {
|
||||
if (!isset($this->routeparams['siteurl']) || empty($this->routeparams['siteurl'])) {
|
||||
throw new \Exception('The siteurl query parameter is not provided or empty');
|
||||
throw new APIException('The siteurl query parameter is not provided or empty');
|
||||
}
|
||||
|
||||
$sites = new \Jump\Sites($this->config, $this->cache);
|
||||
|
||||
Reference in New Issue
Block a user