From 5a48d41bddf599b14dd9019ff49821c436ce4542 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Mon, 18 Oct 2021 17:05:36 +0100 Subject: fix(cli/fmt_errors): don't panic on source line formatting errors (#12449) 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. --- cli/tests/testdata/eval_context_conflicting_source.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 cli/tests/testdata/eval_context_conflicting_source.ts (limited to 'cli/tests/testdata/eval_context_conflicting_source.ts') diff --git a/cli/tests/testdata/eval_context_conflicting_source.ts b/cli/tests/testdata/eval_context_conflicting_source.ts new file mode 100644 index 000000000..671740113 --- /dev/null +++ b/cli/tests/testdata/eval_context_conflicting_source.ts @@ -0,0 +1 @@ +throw new Error("foo"); -- cgit v1.2.3