Revision: 4906 http://sourceforge.net/p/vexi/code/4906 Author: mkpg2 Date: 2016-11-24 01:11:27 +0000 (Thu, 24 Nov 2016) Log Message: ----------- Make exception wrapping overrideable.
Modified Paths: -------------- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Interpreter.java branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java Modified: branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Interpreter.java =================================================================== --- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Interpreter.java 2016-11-24 00:16:42 UTC (rev 4905) +++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Interpreter.java 2016-11-24 01:11:27 UTC (rev 4906) @@ -668,7 +668,7 @@ } catch(Exception e) { if(!(e instanceof JSExn)){ if(e instanceof InterruptedException) e = new JSExn((InterruptedException)e); - else e = new JSExn(e); + else e = thread.faction.wrapUncaught(e); } catchException((JSExn)e); pc--; // it'll get incremented on the next iteration Modified: branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java =================================================================== --- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java 2016-11-24 00:16:42 UTC (rev 4905) +++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java 2016-11-24 01:11:27 UTC (rev 4906) @@ -46,6 +46,10 @@ this.quitOnExn = quitOnExn; } + public JSExn wrapUncaught(Exception e){ + return new JSExn(e); + } + // REMARK - other java threads may want to keep the scheduler from finishing, // as they may schedule work later. This does not apply to background threads // started from a paused js thread (e.g. xmlrpc call) as the scheduler knows This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn