blob: 5be42dd7c866c5db403a330753997fdb1d65f471 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Uncaught exceptions in the debugger itself are delivered to the
// uncaughtExceptionHook.
var g = newGlobal();
var dbg = new Debugger(g);
var log;
dbg.onDebuggerStatement = function () {
log += 'x';
throw new TypeError("fail");
};
dbg.uncaughtExceptionHook = function (exc) {
assertEq(this, dbg);
assertEq(exc instanceof TypeError, true);
log += '!';
};
log = '';
g.eval("debugger");
assertEq(log, 'x!');
|