Example #1
0
 /**
  * Error handler
  */
 public function errorHandler()
 {
     $error = func_get_args();
     if (false === parent::errorHandler($error[0], $error[1], $error[2], $error[3])) {
         return;
     }
     if (true === $this->debug) {
         unset($error[4]);
         echo "<pre>";
         print_r($error);
         echo "</pre>";
     }
     $errcode = Exception::EXCEPTION_FATAL;
     $this->endStatus = $errcode;
     $this->response->setFrHeader($errcode);
     $this->setHeader($errcode);
     if ($this->request->needErrorPage()) {
         $this->goErrorPage($errcode);
     } else {
         $this->response->setError($error);
         $this->response->send();
     }
     exit;
 }