@Signature public Memory getEndLine(Environment env, Memory... args) { return LongMemory.valueOf(entity.getTrace().getEndLine()); }
@Signature public Memory getEndLine(Environment env, Memory... args){ if (getClosureEntity() != null) return LongMemory.valueOf(getClosureEntity().getTrace().getEndLine()); return LongMemory.valueOf(getEntity().getTrace().getEndLine()); }
trace.getContext(), last.getTrace().getStartLine(), trace.getEndLine(), last.getTrace().getStartPosition(), trace.getEndLine() ));
public TraceInfo getTraceAppliedSourceMap(TraceInfo trace) { if (trace == null) { return null; } if (trace.getFile() == null) { return trace; } if (trace instanceof SourceMappedTraceInfo) { return trace; } SourceMap sourceMap = sourceMaps.get(trace.getFileName()); if (sourceMap != null) { int sourceLine = sourceMap.getSourceLine(trace.getStartLine() + 1); if (sourceLine != trace.getStartLine() && sourceLine != -1) { trace = new SourceMappedTraceInfo( trace.getContext(), sourceLine - 1, trace.getEndLine(), trace.getStartPosition(), trace.getEndPosition() ); } } return trace; }
analyzer.getContext(), meta.getStartLine() + oldTrace.getStartLine(), meta.getEndLine() + oldTrace.getEndLine(), meta.getStartLine() + oldTrace.getStartLine(), meta.getEndLine() + oldTrace.getEndLine() )); throw e;
@Test public void testParseError() throws IOException { Throwable ex = null; Tokenizer tokenizer = new Tokenizer(new Context( " 'foobar \n ")); try { tokenizer.nextToken(); } catch (Throwable e){ ex = e; } assertTrue(ex instanceof ParseException); TraceInfo traceInfo = ((ParseException) ex).getTraceInfo(); assertNotNull(traceInfo); assertNull(traceInfo.getContext().getFileName()); assertEquals(1, traceInfo.getStartLine()); assertEquals(1, traceInfo.getEndLine()); assertEquals(1, traceInfo.getStartPosition()); assertEquals(1, traceInfo.getEndPosition()); }