Ejemplo n.º 1
0
 /**
  * Renders the exception.
  * @param \Exception $exception the exception to be rendered.
  */
 protected function renderException($exception)
 {
     $response = new Response();
     if (APPMODE_DEBUG) {
         $response->data = '<pre>' . print_r($exception, true) . '</pre>';
     } else {
         //TODO: implement in production mode
     }
     if ($exception instanceof HttpException) {
         $response->setStatusCode($exception->statusCode);
     } else {
         $response->setStatusCode(500);
     }
     $response->send();
 }