public function __toString() { try { return $this->render(); } catch (\Twig_Error_Loader $e) { sy_exception(new \Simplify\ViewException($e->getMessage(), 0, $e)); trigger_error($e); } catch (\Exception $e) { sy_exception($e); trigger_error($e); } return ''; }
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; }