diff options
Diffstat (limited to 'cli/tests/testdata/error_019_stack_function.ts')
-rw-r--r-- | cli/tests/testdata/error_019_stack_function.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/tests/testdata/error_019_stack_function.ts b/cli/tests/testdata/error_019_stack_function.ts index c5eeae8f4..a6a69d146 100644 --- a/cli/tests/testdata/error_019_stack_function.ts +++ b/cli/tests/testdata/error_019_stack_function.ts @@ -5,6 +5,8 @@ function foo(): never { try { foo(); } catch (error) { - console.log(error.stack); + if (error instanceof Error) { + console.log(error.stack); + } throw error; } |