X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FScheduler.java;h=9b3950924545fa6f6cad424e071e974f8926feaa;hb=2532e32f07910e63b366ac8e02e897e5314be72c;hp=43be3d9201e6cd979184c907c5d3f8fee83bb670;hpb=2994937ce9c79076df13f1ed2d0601f81b72c06e;p=org.ibex.core.git diff --git a/src/org/ibex/Scheduler.java b/src/org/ibex/Scheduler.java index 43be3d9..9b39509 100644 --- a/src/org/ibex/Scheduler.java +++ b/src/org/ibex/Scheduler.java @@ -1,6 +1,8 @@ // Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] package org.ibex; +import java.io.IOException; + import org.ibex.js.*; import org.ibex.util.*; @@ -10,7 +12,7 @@ public class Scheduler { // Public API Exposed to org.ibex ///////////////////////////////////////////////// private static Scheduler singleton; - public static interface Task { public abstract void perform() throws Exception; } + public static interface Task { public abstract void perform() throws IOException, JSExn; } public static void add(Task t) { Scheduler.runnable.append(t); } public static void init() { if (singleton == null) (singleton = Platform.getScheduler()).run(); } @@ -77,11 +79,12 @@ public class Scheduler { renderAll(); } catch (JSExn e) { Log.info(Scheduler.class, "a JavaScript thread spawned with ibex.thread() threw an exception:"); - Log.info(Scheduler.class, "JS Exception: " + e.getObject() + "\n" + e.backtrace()); Log.info(Scheduler.class,e); } catch (Exception e) { Log.info(Scheduler.class, "a Task threw an exception which was caught by the scheduler:"); Log.info(Scheduler.class, e); + } catch (Throwable t) { + t.printStackTrace(); } // if an Error is thrown it will cause the engine to quit }