From 791d69b24de7b17c2c740680cfa1809f18138b9e Mon Sep 17 00:00:00 2001 From: sessingo Date: Fri, 7 Apr 2023 13:08:40 +0200 Subject: [PATCH] Updated documentation --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index cc3666e..3a50b96 100644 --- a/README.md +++ b/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;