Revision: 4429 http://vexi.svn.sourceforge.net/vexi/?rev=4429&view=rev Author: mkpg2 Date: 2012-07-27 05:26:10 +0000 (Fri, 27 Jul 2012) Log Message: ----------- Interpreter.toString(). Display current position <source>:<line>, useful for debugging.
Modified Paths: -------------- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/Interpreter.jpp Modified: trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/Interpreter.jpp =================================================================== --- trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/Interpreter.jpp 2012-07-23 04:24:55 UTC (rev 4428) +++ trunk/org.vexi-library.js/src/main/jpp/org/ibex/js/Interpreter.jpp 2012-07-27 05:26:10 UTC (rev 4429) @@ -148,9 +148,11 @@ String getSourceName() { return f == null ? null : f.sourceName; } + String getWhere(){ return getSourceName() + ":" + getLine(); } - private JSExn je(String s) { return new JSExn(getSourceName() + ":" + getLine() + " " + s); } + private JSExn je(String s) { return new JSExn(getWhere() + " " + s); } + // REMARK - encapsulate loop jump operations here, so that we can test // interuption, but only when there is a chance we're in an infinite loop. private void jump(int delta_pc) throws InterruptedException{ @@ -1029,6 +1031,10 @@ return JSU.N(leftn.toDouble()%rightn.toDouble()); } } + + public String toString(){ + return getWhere(); + } } /* FOOTNOTES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn