@Override void setLocation(Template template, int beginColumn, int beginLine, int endColumn, int endLine) { super.setLocation(template, beginColumn, beginLine, endColumn, endLine); if (isLiteral()) { try { constantValue = _eval(null); } catch (Exception e) { // deliberately ignore. } } }
final TemplateModel eval(Environment env) throws TemplateException { try { return constantValue != null ? constantValue : _eval(env); } catch (FlowControlException e) { throw e; } catch (TemplateException e) { throw e; } catch (Exception e) { if (env != null && EvalUtil.shouldWrapUncheckedException(e, env)) { throw new _MiscTemplateException( this, e, env, "Expression has thrown an unchecked exception; see the cause exception."); } else if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new UndeclaredThrowableException(e); } } }
@Override void setLocation(Template template, int beginColumn, int beginLine, int endColumn, int endLine) { super.setLocation(template, beginColumn, beginLine, endColumn, endLine); if (isLiteral()) { try { constantValue = _eval(null); } catch (Exception e) { // deliberately ignore. } } }
@Override void setLocation(Template template, int beginColumn, int beginLine, int endColumn, int endLine) { super.setLocation(template, beginColumn, beginLine, endColumn, endLine); if (isLiteral()) { try { constantValue = _eval(null); } catch (Exception e) { // deliberately ignore. } } }
final TemplateModel eval(Environment env) throws TemplateException { try { return constantValue != null ? constantValue : _eval(env); } catch (FlowControlException e) { throw e; } catch (TemplateException e) { throw e; } catch (Exception e) { if (env != null && EvalUtil.shouldWrapUncheckedException(e, env)) { throw new _MiscTemplateException( this, e, env, "Expression has thrown an unchecked exception; see the cause exception."); } else if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new UndeclaredThrowableException(e); } } }
final TemplateModel eval(Environment env) throws TemplateException { try { return constantValue != null ? constantValue : _eval(env); } catch (FlowControlException e) { throw e; } catch (TemplateException e) { throw e; } catch (Exception e) { if (env != null && EvalUtil.shouldWrapUncheckedException(e, env)) { throw new _MiscTemplateException( this, e, env, "Expression has thrown an unchecked exception; see the cause exception."); } else if (e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new UndeclaredThrowableException(e); } } }