public PhpException(String message, Context context){ super(message); this.traceInfo = new TraceInfo(context); }
public static TraceInfo valueOf(String fileName, long startLine, long startPosition){ return new TraceInfo(fileName, (int) startLine, (int) startPosition); }
public TraceInfo toTraceInfo(Context context){ return new TraceInfo(context, startLine, endLine, startPosition, endPosition); }
public static TraceInfo valueOf(String fileName, int startLine, int startPosition){ return new TraceInfo(fileName, startLine, startPosition); }
public TraceInfo trace(int systemOffsetStackTrace){ return new TraceInfo(Thread.currentThread().getStackTrace()[systemOffsetStackTrace]); } }
TraceInfo makeTraceInfo(int line, int position) { return new TraceInfo(compiler.getContext(), line, 0, position, 0); }
throw new ParseException( Messages.ERR_PARSE_UNEXPECTED_END_OF_STRING.fetch(), new TraceInfo(context, currentLine, currentLine, pos + 1, pos + 1) ); new TraceInfo(context, currentLine, currentLine, pos, pos) ); throw new ParseException( Messages.ERR_PARSE_UNEXPECTED_END_OF_STRING.fetch(), new TraceInfo(context, startLine, 0, relativePosition, 0) ); throw new ParseException( Messages.ERR_PARSE_UNEXPECTED_END_OF_STRING.fetch(), new TraceInfo(context, startLine, 0, pos, 0) ); throw new ParseException( Messages.ERR_PARSE_UNEXPECTED_END_OF_STRING.fetch(), new TraceInfo(context, currentLine, currentLine, pos, pos) );
CallStackItem prevLast = list.get(list.size() - 2); TraceInfo trace = prevLast.getTrace(); prevLast.setTrace(new TraceInfo( trace.getContext(), last.getTrace().getStartLine(),
trace = env.trace(); else trace = new TraceInfo(where);
@Override public void setTraceInfo(Environment env, TraceInfo trace) { super.setTraceInfo(env, trace); Memory line = clazz.refOfProperty(props, "line"); Memory file = clazz.refOfProperty(props, "file"); if (!line.isNull() || !file.isNull()){ this.trace = new TraceInfo( file.isNull() ? trace.getFileName() : file.toString(), line.isNull() ? trace.getStartLine() : line.toInteger() - 1, trace.getStartPosition() ); } }
public ModuleEntity fetchTemporaryModule(String path, boolean compiled) throws Throwable { Stream stream = fetchStream(path); if (stream == null) { return null; } try { if (stream._isExternalResourceStream()) { env.exception("Cannot import module form external stream: " + stream.getPath()); return null; } else { ModuleEntity module; Context context = fetchContext(stream); if (compiled) { module = env.importCompiledModule(context, true); } else { module = env.importModule(context); } module.setTrace(new TraceInfo(context)); return module; } } finally { env.invokeMethod(stream, "close"); } }
} catch (ParseException e){ TraceInfo oldTrace = e.getTraceInfo(); e.setTraceInfo(new TraceInfo( analyzer.getContext(), meta.getStartLine() + oldTrace.getStartLine(),