Esempio n. 1
0
 public function handleExceptionDefault($exception)
 {
     $view = new ArkViewPHP();
     $http_code = 500;
     $message = ArkResponse::getStatusMessageByCode($http_code);
     if (ARK_APP_DEBUG) {
         $message .= '<br /><pre>' . $exception . '</pre>';
     }
     return new ArkResponse($view->render(ARK_PATH . '/internal/view/http_error.html.php', array('code' => $http_code, 'title' => ArkResponse::getStatusTextByCode($http_code), 'message' => $message), true), $http_code);
 }
Esempio n. 2
0
 public static function getHttpErrorResponse($http_code)
 {
     $view = new ArkViewPHP();
     return new ArkResponse($view->render(ARK_PATH . '/internal/view/http_error.html.php', array('code' => $http_code, 'title' => ArkResponse::getStatusTextByCode($http_code), 'message' => ArkResponse::getStatusMessageByCode($http_code)), true), $http_code);
 }