Skip to content
Snippets Groups Projects
Commit 918dcd16 authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Add a new hook for exception handling.

In line with the previous commit, we now allow hooking in the exception handler, so that a module can implement its own logic to deal with certain exceptions.
parent 613e2c99
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,8 @@ SimpleSAML_Error_Assertion::installHandler(); ...@@ -37,6 +37,8 @@ SimpleSAML_Error_Assertion::installHandler();
// show error page on unhandled exceptions // show error page on unhandled exceptions
function SimpleSAML_exception_handler(Exception $exception) function SimpleSAML_exception_handler(Exception $exception)
{ {
SimpleSAML\Module::callHooks('exception_handler', $exception);
if ($exception instanceof SimpleSAML_Error_Error) { if ($exception instanceof SimpleSAML_Error_Error) {
$exception->show(); $exception->show();
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment