/** * * classic exeption Handler * * @param unknown_type $e */ public static function exceptionHandler($e) { Logger::write('error', $e->getMessage() . PHP_EOL . $e->getFile() . PHP_EOL . $e->getLine()); if (Configuration::getInstance()->get('config.showErrors')) { echo '<h1>' . get_class($e) . '</h1>'; echo implode(PHP_EOL, array($e->getMessage(), $e->getFile(), $e->getLine())); var_dump($e); exit; } return self::_renderErrorPage($e); }
/** * fallback Exception handler * * @param unknown_type $exception */ public function fallback_handler($exception) { die('Uncaught exception: ' . $exception->getMessage()); }
/** * Method: exceptionHandler * Handles Exception, prepares them and passes them to ErrorHandler * @param unknown_type $exception */ public static function exceptionHandler($exception) { static::handleError($exception->getCode(), $exception->getMessage(), $exception->getFile(), $exception->getLine(), get_class($exception), $exception->getTrace()); }