예제 #1
0
 private static function dispatchError(Exception $e, $renderType = null, $message = null, $status = 500)
 {
     Log::error($e);
     ob_clean();
     header(sprintf('%s %d %s', $_SERVER['SERVER_PROTOCOL'], $status, self::getMessageByStatus($status)));
     require APPLICATION_PATH . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . 'ErrorController' . PHP_EXTENSION;
     $error = new ErrorController();
     if (!empty($renderType)) {
         $error->setRenderType($renderType);
     }
     $error->indexAction($message);
 }