public function handle() { $status = $this->response()->status(); $filePath = $this->getService('rails.config')['paths']['public_path']->extend($status . '.html'); if (is_file($filePath)) { $body = file_get_contents($filePath); } else { $body = sprintf(Reporter::ERROR_NOTICE, $status, StatusCodes::getName($status)); } $this->response()->setBody($body); }
protected function errorNotice($e, $status) { return sprintf(self::ERROR_NOTICE, $status, StatusCodes::getName($status)); }