Example #1
0
 /**
  * @param \Exception $exception
  * @throws Exception\ConfigParameterNotFound
  */
 public function renderException(\Exception $exception)
 {
     $templatePath = join(DIRECTORY_SEPARATOR, [Renderer::getUserViewDirectory(), 'errors', 'error.php']);
     if (!file_exists($templatePath)) {
         $templatePath = join(DIRECTORY_SEPARATOR, [self::VIEW_PATH, 'error.php']);
     }
     extract(['exception' => $exception]);
     $this->sendHeadersWithHttpCode($exception->getCode());
     require_once $templatePath;
 }