/** * Builds a response for an exception * @param \Exception $exception * @return \PHPixie\HTTP\Responses\Response */ public function process($exception) { $templateName = $this->configData->getRequired('template'); $trace = $this->debug->exceptionTrace($exception); $body = $this->template->render($templateName, array('exception' => $exception, 'trace' => $trace, 'logger' => $this->debug->logger())); return $this->http->responses()->response($body, array(), 500); }
/** * Build a response for when a uri does not exist * @param \PHPixie\HTTP\Request $request * @return \PHPixie\HTTP\Responses\Response */ public function process($request) { $templateName = $this->configData->getRequired('template'); $body = $this->template->render($templateName, array('request' => $request)); return $this->http->responses()->response($body, array(), 404); }