mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[OPTIMISATION] Optimised exception-message thrown when not using IExceptionHandler interface.
This commit is contained in:
@@ -188,7 +188,7 @@ class RouterBase {
|
||||
if($this->request->loadedRoute !== null && $this->request->loadedRoute->exceptionHandler !== null) {
|
||||
$handler = new $this->request->loadedRoute->exceptionHandler();
|
||||
if(!($handler instanceof IExceptionHandler)) {
|
||||
throw new RouterException('Exception handler must be instanceof IExceptionHandler.');
|
||||
throw new RouterException('Exception handler must implement the IExceptionHandler interface.');
|
||||
}
|
||||
|
||||
$handler->handleError($this->request, $this->request->loadedRoute, $e);
|
||||
|
||||
Reference in New Issue
Block a user