From 2b362bef8523f3d8c05ce5d3d4b4a839b669568d Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sat, 11 Apr 2020 07:08:11 +0100 Subject: refactor(cli/fmt_errors): Format stack frames in prepareStackTrace() (#4706) --- cli/tests/error_020_stack_constructor.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cli/tests/error_020_stack_constructor.ts (limited to 'cli/tests/error_020_stack_constructor.ts') diff --git a/cli/tests/error_020_stack_constructor.ts b/cli/tests/error_020_stack_constructor.ts new file mode 100644 index 000000000..49988280b --- /dev/null +++ b/cli/tests/error_020_stack_constructor.ts @@ -0,0 +1,12 @@ +class A { + constructor() { + throw new Error("constructor"); + } +} + +try { + new A(); +} catch (error) { + console.log(error.stack); + throw error; +} -- cgit v1.2.3