mirror of
https://github.com/denoland/deno.git
synced 2024-12-30 11:16:38 -05:00
9853c96cc4
This commit: - removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn - removes "deno_core::JsError::create" and "deno_core::RuntimeOptions::js_error_create_fn" - adds new option to "deno_runtime::ops::worker_host::init"
11 lines
276 B
TypeScript
11 lines
276 B
TypeScript
const worker = new Worker(new URL("error.ts", import.meta.url).href, {
|
|
type: "module",
|
|
});
|
|
worker.addEventListener("error", (e) => {
|
|
console.log({
|
|
"message": e.message,
|
|
"filename": e.filename?.slice?.(-100),
|
|
"lineno": e.lineno,
|
|
"colno": e.colno,
|
|
});
|
|
});
|