private Trap() { allTraps.put(myWeak, dummy); }
/** perform this trap -- arg.length == 0 if this is a get; otherwise it contains a single element to be put */
- public Object perform(JS.Array args) {
+ public Object perform(JS.Array args) throws JS.Exn {
TrapContext tc = TrapContext.get();
// save both thread-locals on the stack and update their values
if (args.length() > 0 && !isreadtrap && !tc.putCascadeHappened) cascadeFunction.call(args);
return ret;
-
- } catch (JS.Exn e) {
- if (Log.on) Log.log(this, e);
-
+
} finally {
// restore the thread-locals
tc.putCascadeHappened = save_putCascadeHappened;
tc.currentTrap = save_currentTrap;
tc.trapDepth--;
}
- return null;
}
/** removes this trap */