Example #1
0
 /**
  * Default exception handler.
  *
  * @param Exception $e
  */
 public static function handleException(Exception $e)
 {
     XenForo_Error::logException($e);
     XenForo_Error::unexpectedException($e);
 }
Example #2
0
 /**
  * Implicit string cast renders the template.
  *
  * @return string
  */
 public function __toString()
 {
     try {
         return $this->render();
     } catch (Exception $e) {
         XenForo_Error::logException($e, false, "Template to string error:");
         XenForo_Error::unexpectedException($e);
     }
 }