mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Better exception matching
This commit is contained in:
parent
6334838079
commit
3c2819081d
3 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ try{
|
|||
throw new InvalidAuthorException();
|
||||
}
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
catch(InvalidAuthorException $ex){
|
||||
http_response_code(404);
|
||||
include(WEB_ROOT . '/404.php');
|
||||
exit();
|
||||
|
|
|
@ -65,7 +65,7 @@ catch(SeeOtherEbookException $ex){
|
|||
header('Location: ' . $ex->Url);
|
||||
exit();
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
catch(InvalidEbookException $ex){
|
||||
http_response_code(404);
|
||||
include(WEB_ROOT . '/404.php');
|
||||
exit();
|
||||
|
|
|
@ -127,7 +127,7 @@ try{
|
|||
|
||||
$queryString = preg_replace('/^&/ius', '', $queryString);
|
||||
}
|
||||
catch(\Exception $ex){
|
||||
catch(InvalidCollectionException $ex){
|
||||
http_response_code(404);
|
||||
include(WEB_ROOT . '/404.php');
|
||||
exit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue