示例#1
0
function sy_exception_error_handler($errno, $errstr, $errfile, $errline)
{
    if ((error_reporting() & $errno) == $errno) {
        return sy_exception_handler(sy_exception() ? sy_exception(false) : new ErrorException($errstr, 0, $errno, $errfile, $errline));
    }
    return false;
}
示例#2
0
 /**
  * Call render and return the rendered view
  *
  * @return string
  */
 public function __toString()
 {
     try {
         $output = $this->getView()->render();
     } catch (\Exception $e) {
         sy_exception_handler($e);
         $output = '';
     }
     return $output;
 }