mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
5a48d41bdd
Returns empty values in case of errors, source lines are non-essential anyway. These errors can happen e.g. when source files change at runtime. A warning is also printed to help us track when it happens in unexpected cases besides this.
6 lines
240 B
TypeScript
6 lines
240 B
TypeScript
// deno-lint-ignore no-explicit-any
|
|
const [, errorInfo] = (Deno as any).core.evalContext(
|
|
'/* aaaaaaaaaaaaaaaaa */ throw new Error("foo")',
|
|
new URL("eval_context_conflicting_source.ts", import.meta.url).href,
|
|
);
|
|
throw errorInfo.thrown;
|