summaryrefslogtreecommitdiff
path: root/tests/testdata/run/error_022_stack_custom_error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/run/error_022_stack_custom_error.ts')
-rw-r--r--tests/testdata/run/error_022_stack_custom_error.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testdata/run/error_022_stack_custom_error.ts b/tests/testdata/run/error_022_stack_custom_error.ts
new file mode 100644
index 000000000..b95743503
--- /dev/null
+++ b/tests/testdata/run/error_022_stack_custom_error.ts
@@ -0,0 +1,14 @@
+class CustomError extends Error {
+ constructor() {
+ super();
+ this.name = "CustomError";
+ }
+
+ get message(): string {
+ return "custom error";
+ }
+}
+
+const error = new CustomError();
+console.log(error.stack);
+throw error;