Revision: 4886 http://sourceforge.net/p/vexi/code/4886 Author: clrg Date: 2016-10-14 16:53:02 +0000 (Fri, 14 Oct 2016) Log Message: ----------- Quit if something goes badly wrong instead of leaving an unresponsive window.
Modified Paths: -------------- 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/Scheduler.java =================================================================== --- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java 2016-10-14 15:57:07 UTC (rev 4885) +++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java 2016-10-14 16:53:02 UTC (rev 4886) @@ -112,27 +112,32 @@ synchronized (this) { //Log.debug(Scheduler.class, "performing " + current); - run(current); + run(current); } renderAll(); /*} catch (Stop e){ Log.uInfo(Scheduler.class, "Scheduler halted: " + e.getMessage()); return;*/ - } catch (Exception e) { + } catch (Error err) { + logger.error(Scheduler.class, "Something has gone badly wrong!"); + logger.error(Scheduler.class, err); + return new Exception("Encountered '"+err.getMessage()); + + } catch(Exception e) { // REMARK for running tests, as we need to pass any // uncaught js/assertion exceptions out. if (quitOnExn) { return e; } - if(current instanceof Thread){ + if (current instanceof Thread) { logger.error(Scheduler.class, "Vexiscript unhandled exception - "+((Thread)current).description()+":"); - }else{ + } else { logger.error(Scheduler.class, "Background call unhandled exception:"); } - if(e instanceof JSExn){ + if (e instanceof JSExn) { ((JSExn)e).printStackTrace(Logger.ERROR, logger, Scheduler.class); - }else{ + } else { logger.error(Scheduler.class, e); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn