Fixed unhandled exception catching.
[fa-stable.git] / includes / errors.inc
index c5414d60b92b26aca3d27fa8b641a5b7c2fd7421..1a66d96f701525780a0d9eddd29f32e2f17f86e9 100644 (file)
@@ -87,6 +87,13 @@ function error_handler($errno, $errstr, $file, $line) {
        
     return true;
 }
+
+function exception_handler($exception)
+{
+       error_handler(E_ERROR, sprintf(_("Unhandled exception [%s]: %s."), $exception->getCode(), $exception->getMessage()),
+                $exception->getFile(), $exception->getLine());
+       end_page();
+}
 //------------------------------------------------------------------------------
 //     Formats system messages before insert them into message <div>
 // FIX center is unused now