Inheritance: extends RuntimeException
Exemplo n.º 1
0
 /**
  * @param HttpException $e
  * @return Response
  */
 protected function renderHttpException(HttpException $e)
 {
     $status = $e->getStatusCode();
     $template = Config::get('http_exception_template');
     if (!App::$debug && !empty($template[$status])) {
         return Response::create($template[$status], 'view')->vars(['e' => $e]);
     } else {
         return $this->convertExceptionToResponse($e);
     }
 }
Exemplo n.º 2
0
 /**
  * @param HttpException $e
  * @return \think\Response
  */
 protected function renderHttpException(HttpException $e)
 {
     $status = $e->getStatusCode();
     //TODO 根据状态码自动输出错误页面
     return $this->convertExceptionToResponse($e);
 }
 public function __construct()
 {
     parent::__construct(404);
 }