blob: b957435038e5387351774b80c8fc79c6f03c73b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
|