Skip to content

Commit 791d69b

Browse files
committed
Updated documentation
1 parent aa654a3 commit 791d69b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,17 @@ class CustomExceptionHandler implements IExceptionHandler
10361036
return;
10371037

10381038
}
1039+
1040+
/* Other error */
1041+
if($error instanceof MyCustomException) {
1042+
1043+
$request->setRewriteRoute(
1044+
// Add new route based on current url (minus query-string) and add custom parameters.
1045+
(new RouteUrl(url(null, null, []), 'PageController@error'))->setParameters(['exception' => $error])
1046+
);
1047+
return;
1048+
1049+
}
10391050

10401051
throw $error;
10411052

0 commit comments

Comments
 (0)