summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/error_022_stack_custom_error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/error_022_stack_custom_error.ts')
-rw-r--r--cli/tests/testdata/error_022_stack_custom_error.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/testdata/error_022_stack_custom_error.ts b/cli/tests/testdata/error_022_stack_custom_error.ts
new file mode 100644
index 000000000..b95743503
--- /dev/null
+++ b/cli/tests/testdata/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;