summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/new/test/mochitest/examples/exceptions.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/new/test/mochitest/examples/exceptions.js')
-rw-r--r--devtools/client/debugger/new/test/mochitest/examples/exceptions.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/devtools/client/debugger/new/test/mochitest/examples/exceptions.js b/devtools/client/debugger/new/test/mochitest/examples/exceptions.js
new file mode 100644
index 000000000..9523f00ca
--- /dev/null
+++ b/devtools/client/debugger/new/test/mochitest/examples/exceptions.js
@@ -0,0 +1,19 @@
+function uncaughtException() {
+ throw "unreachable"
+}
+
+function caughtError() {
+ try {
+ throw new Error("error");
+ } catch (e) {
+ debugger;
+ }
+}
+
+function caughtException() {
+ try {
+ throw "reachable";
+ } catch (e) {
+ debugger;
+ }
+}