mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 18:02:09 +00:00
Fixed: try next exception-handler if one throws error.
This commit is contained in:
@@ -329,6 +329,8 @@ class Router
|
|||||||
throw new HttpException('Exception handler must implement the IExceptionHandler interface.', 500);
|
throw new HttpException('Exception handler must implement the IExceptionHandler interface.', 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
if ($handler->handleError($this->request, $e) !== null) {
|
if ($handler->handleError($this->request, $e) !== null) {
|
||||||
|
|
||||||
$rewriteRoute = $this->request->getRewriteRoute();
|
$rewriteRoute = $this->request->getRewriteRoute();
|
||||||
@@ -349,6 +351,10 @@ class Router
|
|||||||
return $this->routeRequest(true);
|
return $this->routeRequest(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
|
|||||||
Reference in New Issue
Block a user