예제 #1
0
 public function displayError($code)
 {
     try {
         $view = \Framework\View::getInstance();
         $view->display('errors.' . $code);
     } catch (\Exception $exc) {
         \Framework\Common::headerStatus($code);
         echo '<h1>' . $error . '</h1>';
         exit;
     }
 }
예제 #2
0
 public function displayError($error)
 {
     try {
         $view = View::getInstance();
         $view->display('errors.' . $error);
     } catch (\Exception $ex) {
         Common::headerStatus($error);
         echo '<h1>' . $error . '</h1>';
         exit;
     }
 }
 public function displayError(\Exception $error)
 {
     $message = ['error' => $error->getMessage(), 'isLogged' => $this->_session->userid];
     try {
         $view = View::getInstance();
         $view->display('error', $message);
     } catch (\Exception $ex) {
         Common::headerStatus($error);
         echo '<h1>' . $error->getMessage() . '</h1>';
         exit;
     }
 }