public EvalError( String s, SimpleNode node, CallStack callstack ) { this.message = s; this.node = node; // freeze the callstack for the stack trace. this.callstack = callstack==null ? null : callstack.copy(); }
public EvalError( String s, SimpleNode node, CallStack callstack ) { this.message = s; this.node = node; // freeze the callstack for the stack trace. this.callstack = callstack==null ? null : callstack.copy(); }
public String getScriptStackTrace() { if ( callstack == null ) return "<Unknown>"; String trace = ""; CallStack stack = callstack.copy(); while ( stack.depth() > 0 ) { NameSpace ns = stack.pop(); SimpleNode node = ns.getNode(); if ( ns.isMethod ) { trace = trace + "\nCalled from method: " + ns.getName(); if ( node != null ) trace += " : at Line: "+ node.getLineNumber() + " : in file: "+ node.getSourceFile() + " : "+node.getText(); } } return trace; }
public String getScriptStackTrace() { if ( callstack == null ) return "<Unknown>"; String trace = ""; CallStack stack = callstack.copy(); while ( stack.depth() > 0 ) { NameSpace ns = stack.pop(); SimpleNode node = ns.getNode(); if ( ns.isMethod ) { trace = trace + "\nCalled from method: " + ns.getName(); if ( node != null ) trace += " : at Line: "+ node.getLineNumber() + " : in file: "+ node.getSourceFile() + " : "+node.getText(); } } return trace; }
CallStack returnStack = callstack.copy();
CallStack returnStack = visitor.getCallstack().copy();