Exemple #1
0
 /**
  * Shutdown handler to catch fatal errors and execute of the planned activities.
  * @return void
  * @internal
  */
 public static function _shutdownHandler()
 {
     if (!self::$enabled) {
         return;
     }
     $error = error_get_last();
     if (in_array($error['type'], array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) {
         self::_exceptionHandler(Helpers::fixStack(new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line'])), TRUE);
     } elseif (!connection_aborted() && !self::$productionMode && self::isHtmlMode()) {
         self::getBar()->render();
     }
 }