blob: 0dc46b4ec08f98a8d51e0ea77a4582e411fee767 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"use strict";
self.addEventListener("message", function onMessage({ data }) {
return foo(data);
});
var w = new Worker("test-error-worker2.js");
w.postMessage({});
function foo(data) {
switch (data) {
case 1:
throw new Error("hello");
case 2:
/* eslint-disable */
throw "there";
case 3:
throw new DOMException("dom");
}
}
|