예제 #1
0
 /**
  * 
  * 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);
 }
예제 #2
0
 /**
  * fallback Exception handler
  *
  * @param unknown_type $exception            
  */
 public function fallback_handler($exception)
 {
     die('Uncaught exception: ' . $exception->getMessage());
 }
예제 #3
0
 /**
  * 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());
 }