mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-09 01:56:39 +02:00
exception: Remove HttpException class
This class served no particular purpose (other than adding a layer on top of Exception).
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user