michael@0: // onExceptionUnwind is not called for exceptions thrown and handled in the debugger. michael@0: var g = newGlobal(); michael@0: var dbg = Debugger(g); michael@0: g.log = ''; michael@0: dbg.onDebuggerStatement = function (frame) { michael@0: try { michael@0: throw new Error("oops"); michael@0: } catch (exc) { michael@0: g.log += exc.message; michael@0: } michael@0: }; michael@0: dbg.onExceptionUnwind = function (frame) { michael@0: g.log += 'BAD'; michael@0: }; michael@0: michael@0: g.eval("debugger; log += ' ok';"); michael@0: assertEq(g.log, 'oops ok');