exception: Remove HttpException class
This class served no particular purpose (other than adding a layer on top of Exception).
This commit is contained in:
parent
dbffbd4d4e
commit
c6a7b9ac64
5 changed files with 6 additions and 16 deletions
|
@ -109,7 +109,7 @@ try {
|
|||
|
||||
// whitelist control
|
||||
if(!Bridge::isWhitelisted($bridge)) {
|
||||
throw new \HttpException('This bridge is not whitelisted', 401);
|
||||
throw new \Exception('This bridge is not whitelisted', 401);
|
||||
die;
|
||||
}
|
||||
|
||||
|
@ -272,11 +272,8 @@ try {
|
|||
} else {
|
||||
echo BridgeList::create($showInactive);
|
||||
}
|
||||
} catch(HttpException $e) {
|
||||
} catch(\Exception $e) {
|
||||
error_log($e);
|
||||
header('Content-Type: text/plain', true, $e->getCode());
|
||||
die($e->getMessage());
|
||||
} catch(\Exception $e) {
|
||||
error_log($e);
|
||||
die($e->getMessage());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue