/** * 输出HTTP异常信息 * * @param HttpException $e */ protected function renderHttpException(HttpException $e) { $message = $e->getMessage(); if (empty($message)) { $message = Response::getStatusText($e->getCode()); } $response = new Response(); $response->setStatus($e->getCode()); $response->setContent("<h1>{$message}</h1>"); $response->send(); }