/** Called when a script exception has been thrown. */
 private void handleExceptionThrown(Context cx, Throwable ex, StackFrame frame) {
   if (breakOnExceptions) {
     ContextData cd = frame.contextData();
     if (cd.lastProcessedException != ex) {
       interrupted(cx, frame, ex);
       cd.lastProcessedException = ex;
     }
   }
 }
 /** Called when a breakpoint has been hit. */
 private void handleBreakpointHit(StackFrame frame, Context cx) {
   breakFlag = false;
   interrupted(cx, frame, null);
 }