Example #1
0
 protected function errorHandler(BaseException $e)
 {
     $this->statusCode($e->getCode());
     $this->view->message = $e->getMessage();
     $this->view->code = $e->getCode();
     $this->view->contextMessage = $e->getContextMessage();
     $this->view->display('error');
 }
Example #2
0
 public function handle(BaseException $e)
 {
     if ($e->level === 2) {
         if (!IS_DEBUG) {
             $this->runErrorAction(new E500Exception($e->getMessage()));
         } else {
             $this->showException($e);
         }
     } else {
         $this->runErrorAction($e);
     }
 }