@Override public void setLineNumber(final int lineNumber) { wrappedCompileException.setLineNumber(lineNumber); }
public static void copyErrorLocation(Exception e, BaseDescr descr) { if (e instanceof CompileException) { CompileException compileException = (CompileException)e; compileException.setLineNumber(descr.getLine()); compileException.setColumn(descr.getColumn()); } }
private int captureOrbInternal() { try { ParserContext pCtx = new ParserContext(); cursor = balancedCaptureWithLineAccounting(template, start = cursor, length, '{', pCtx); line += pCtx.getLineCount(); int ret = start + 1; start = cursor + 1; return ret; } catch (CompileException e) { e.setLineNumber(line); e.setColumn((cursor - colStart) + 1); throw e; } }
private int captureOrbInternal() { try { ParserContext pCtx = new ParserContext(); cursor = balancedCaptureWithLineAccounting(template, start = cursor, length, '{', pCtx); line += pCtx.getLineCount(); int ret = start + 1; start = cursor + 1; return ret; } catch (CompileException e) { e.setLineNumber(line); e.setColumn((cursor - colStart) + 1); throw e; } }
private int captureOrbInternal() { try { ParserContext pCtx = new ParserContext(); cursor = balancedCaptureWithLineAccounting(template, start = cursor, length, '{', pCtx); line += pCtx.getLineCount(); int ret = start + 1; start = cursor + 1; return ret; } catch (CompileException e) { e.setLineNumber(line); e.setColumn((cursor - colStart) + 1); throw e; } }
public int captureOrbInternal() { try { ParserContext pCtx = new ParserContext(); cursor = balancedCaptureWithLineAccounting(template, start = cursor, '{', pCtx); line += pCtx.getLineCount(); int ret = start + 1; start = cursor + 1; return ret; } catch (CompileException e) { e.setLineNumber(line); e.setColumn((cursor - colStart) + 1); throw e; } }
@Override public Object eval(final Map<String, Object> vars) { try { return MVEL.executeExpression(mvelExpression, vars); } catch (CompileException e) { e.getMessage(); if (e.getLineNumber() == 1) { e.setColumn((e.getColumn() + column) - 1); } e.setLineNumber((e.getLineNumber() + lineNumber) - 1); throw e; } catch (NoClassDefFoundError e) { PropertyAccessException pe = new PropertyAccessException( "Type of variable or property could not be resolved during evaluating expression.", expression.toCharArray(), 0, e, null); pe.setColumn(column); pe.setLineNumber(lineNumber); throw pe; } }
/** * Constructor. * * @param name * the name of template. * @param compileException * the {@link CompileException}. * @param columnNumber * the column where the expression starts. * @param lineNumber * the line where the expression starts. */ public NamedCompileException(final String name, final CompileException compileException, final int columnNumber, final int lineNumber) { super("", compileException.getExpr(), compileException.getCursor()); compileException.setColumn(columnNumber); compileException.setLineNumber(lineNumber); compileException.setErrors(compileException.getErrors()); // setEvaluationContext(); compileException.setLastLineStart(compileException.getLastLineStart()); compileException.setStackTrace(compileException.getStackTrace()); wrappedCompileException = compileException; this.name = name; }
ce.setLineNumber(line); CompileException ce = new CompileException("unclosed @" + ((Node) stack.peek()).getName() + "{} block. expected @end{}", template, cursor); ce.setColumn(cursor - colStart); ce.setLineNumber(line); throw ce;
ce.setLineNumber(line); CompileException ce = new CompileException("unclosed @" + ((Node) stack.peek()).getName() + "{} block. expected @end{}", template, cursor); ce.setColumn(cursor - colStart); ce.setLineNumber(line); throw ce;
ce.setLineNumber(line); + "{} block. expected @end{}", template, cursor); ce.setColumn(cursor - colStart); ce.setLineNumber(line); throw ce;
ce.setLineNumber(line); CompileException ce = new CompileException("unclosed @" + ((Node) stack.peek()).getName() + "{} block. expected @end{}", template, cursor); ce.setColumn(cursor - colStart); ce.setLineNumber(line); throw ce;
e.setLineNumber(line + e.getLineNumber()); e.setCursor(cursor); throw e; ce.setLineNumber(line); ce.setCursor(cursor); throw ce;
c.setLineNumber(line); c.setColumn(cursor - lastLineStart); throw c; c.setLineNumber(line); c.setColumn(cursor - lastLineStart); throw c; c.setLineNumber(line); c.setColumn(cursor - lastLineStart); throw c; e.setLineNumber(pCtx == null ? 1 : pCtx.getLineCount()); e.setCursor(cursor); e.setColumn(cursor - (pCtx == null ? 0 : pCtx.getLineOffset()));
ce.setLineNumber(line); ce.setCursor(cursor); throw ce;
ce.setLineNumber(line); ce.setCursor(cursor); throw ce;
e.setLineNumber(pCtx.getLineCount()); e.setCursor(cursor); e.setColumn(cursor - pCtx.getLineOffset());