/** * FirePHP's exception handler * * Logs all exceptions to your firebug console and then stops the script. * * @param Exception $Exception * @throws Exception */ public static function exceptionHandler($Exception) { self::$inExceptionHandler = true; header('HTTP/1.1 500 Internal Server Error'); try { FB::error($Exception); } catch (Exception $e) { echo 'We had an exception: ' . $e; } self::$inExceptionHandler = false; }