Updated documentation

This commit is contained in:
sessingo
2023-04-07 13:08:40 +02:00
parent aa654a3ac6
commit 791d69b24d

View File

@@ -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;