mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-15 18:23:26 +03:00
Updated documentation
This commit is contained in:
11
README.md
11
README.md
@@ -1036,6 +1036,17 @@ class CustomExceptionHandler implements IExceptionHandler
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/* Other error */
|
||||
if($error instanceof MyCustomException) {
|
||||
|
||||
$request->setRewriteRoute(
|
||||
// Add new route based on current url (minus query-string) and add custom parameters.
|
||||
(new RouteUrl(url(null, null, []), 'PageController@error'))->setParameters(['exception' => $error])
|
||||
);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
throw $error;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user