From 5083f5fd908057cbc8649b79c13ab78a7f7ebf34 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Mon, 29 Jul 2019 19:11:08 +1000 Subject: Remap stack traces of unthrown errors. (#2693) --- tests/error_stack.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/error_stack.ts (limited to 'tests/error_stack.ts') diff --git a/tests/error_stack.ts b/tests/error_stack.ts new file mode 100644 index 000000000..f2125d662 --- /dev/null +++ b/tests/error_stack.ts @@ -0,0 +1,10 @@ +function foo(): never { + throw new Error("foo"); +} + +try { + foo(); +} catch (e) { + console.log(e); + throw e; +} -- cgit v1.2.3