/**
  * Catches errors that are not caught by the error handler, such as E_PARSE.
  *
  * @uses    Kohana_Exception::handle()
  * @return  void
  */
 public static function shutdown_handler()
 {
     if (Kohana_PHP_Exception::$enabled and $error = error_get_last() and error_reporting() & $error['type']) {
         // Fake an exception for nice debugging
         Kohana_Exception::handle(new Kohana_PHP_Exception($error['type'], $error['message'], $error['file'], $error['line']));
     }
 }
Esempio n. 2
0
 /**
  * Magically converts mod view object to string.
  *
  * @return  string
  */
 public function __toString()
 {
     try {
         return $this->render(false, array($this, 'wrap'));
     } catch (Exception $e) {
         Kohana_Exception::handle($e);
         return '';
     }
 }
Esempio n. 3
0
 /**
  * Magically converts view object to string.
  *
  * @return  string
  */
 public function __toString()
 {
     try {
         return $this->render();
     } catch (Exception $e) {
         Kohana_Exception::handle($e);
         return (string) '';
     }
 }