/** * Merge the node info and the cause info to obtain best possible location. * @param node the node * @param cause the cause * @return the info to use */ private static DebugInfo merge(JexlInfo node, ParseException cause) { DebugInfo dbgn = node != null ? node.debugInfo() : null; if (cause == null) { return dbgn; } else if (dbgn == null) { return new DebugInfo("", cause.getLine(), cause.getColumn()); } else { return new DebugInfo(dbgn.getName(), cause.getLine(), cause.getColumn()); } }