Exemplo n.º 1
0
 /**
  * Catches errors that are not caught by the error handler, such as E_PARSE.
  *
  * @uses    Eight_Exception::handle()
  * @return  void
  */
 public static function shutdown_handler()
 {
     if (Eight_Exception_PHP::$enabled and $error = error_get_last() and error_reporting() & $error['type']) {
         // Fake an exception for nice debugging
         Eight_Exception::handle(new Eight_Exception_PHP($error['type'], $error['message'], $error['file'], $error['line']));
     }
 }
Exemplo n.º 2
0
 /**
  * Magic method, returns the output of [View::render].
  *
  * @return  string
  * @uses    View::render
  */
 public function __toString()
 {
     try {
         return $this->render();
     } catch (Exception $e) {
         // Display the exception message
         Eight_Exception::handle($e);
         return '';
     }
 }