Source code
Revision control
Copy as Markdown
Other Tools
"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");
}
}