/** * Creates a new JexlException. * @param node the node causing the error * @param msg the error message */ public JexlException(JexlNode node, String msg) { super(msg); mark = node; info = node != null ? node.debugInfo() : null; }
/** {@inheritDoc} */ public String debugString() { DebugInfo info = debugInfo(); return info != null ? info.debugString() : ""; }
/** * Creates a new JexlException. * @param node the node causing the error * @param msg the error message * @param cause the exception causing the error */ public JexlException(JexlNode node, String msg, Throwable cause) { super(msg, unwrap(cause)); mark = node; info = node != null ? node.debugInfo() : null; }
/** {@inheritDoc} */ @Override protected Expression prepare(Interpreter interpreter) { String value = interpreter.interpret(node).toString(); JexlNode dnode = jexl.parse(value, jexl.isDebug() ? node.debugInfo() : null, null); return new ImmediateExpression(value, dnode, this); }
/** * Ambiguous statement detector. * @param n the node * @throws ParseException */ void jjtreeCloseNodeScope(JexlNode n) throws ParseException { if (n instanceof ASTAmbiguous && n.jjtGetNumChildren() > 0) { DebugInfo dbgInfo = null; Token tok = this.getToken(0); if (tok != null) { dbgInfo = new DebugInfo(tok.image, tok.beginLine, tok.beginColumn); } else { dbgInfo = n.debugInfo(); } throw new JexlException.Parsing(dbgInfo, "Ambiguous statement, missing ';' between expressions", null); } } }