- public static class PausedException extends Exception { PausedException() { } }
-
- public static void invokePauseable(JSFunction function) throws JS.PausedException, JSExn {
- Interpreter i = new Interpreter(function, true, new JSArray());
- int oldpausecount = i.pausecount;
- i.resume();
- if (i.pausecount > oldpausecount) throw new PausedException();
- }
-