equal
deleted
inserted
replaced
|
1 <html> |
|
2 <head> |
|
3 <script> |
|
4 function generateUncaughtException() { |
|
5 var b = 5; |
|
6 // Pause on uncaught exceptions and pause on all exceptions should pause here, |
|
7 // because even though the exception is being caught by our caller in this case, |
|
8 // it is not being caught in the same function. |
|
9 b.foo.bar; |
|
10 } |
|
11 |
|
12 function generateCaughtAndUncaughtExceptions() { |
|
13 var a = 5; |
|
14 try { |
|
15 // This will pause on Pause on all exceptions, but not Pause on uncaught exceptions. |
|
16 a.foo.bar; |
|
17 } catch (e) { } |
|
18 |
|
19 try { |
|
20 generateUncaughtException(); |
|
21 } catch (e) { } |
|
22 |
|
23 // This will pause on both Pause on all exceptions and Pause on uncaught exceptions. |
|
24 a.foo.bar; |
|
25 } |
|
26 </script> |
|
27 </head> |
|
28 <body> |
|
29 <p>This page tests <a href="https://bugs.webkit.org/show_bug.cgi?id=28622">Caught exceptions still pause the debugger</a> |
|
30 <p>To test this bug, open the inspector, open the scripts panel, and click the button to pause on all exceptions, press |
|
31 the button, and see which exceptions are paused on. Then press the pause on exceptions button again to only |
|
32 pause on uncaught exceptions, and see which exceptions are paused on.</p> |
|
33 <input type="button" value="Generate caught and uncaught exceptions" onclick="generateCaughtAndUncaughtExceptions();" /> |
|
34 </body> |
|
35 </html> |