Skip to content
Snippets Groups Projects
Commit 84215918 authored by Olav Morken's avatar Olav Morken
Browse files

_include: Make the generic exception handler handle errors.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2123 44740490-163a-0410-bde0-09ae8108e29a
parent f65deb3e
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,13 @@ SimpleSAML_Error_Assertion::installHandler();
/* Show error page on unhandled exceptions. */
function SimpleSAML_exception_handler(Exception $exception) {
$e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $exception);
$e->show();
if ($exception instanceof SimpleSAML_Error_Error) {
$exception->show();
} else {
$e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $exception);
$e->show();
}
}
set_exception_handler('SimpleSAML_exception_handler');
......
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