Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit a5dc7da

Browse files
committed
error: change name and disable stack
@truffle/error's intent is to give the user an action to perform and does not need a stack trace. - rename @truffle/error to be TruffleError - set the stack to so there is not stacktrace when using bundle
1 parent 3123c7b commit a5dc7da

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/error/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
//Note: This class only exists for compatibility with some old Javascript
2-
//stuff that avoided using Error directly for whatever reason. Eventually
3-
//it should be eliminated.
4-
class ExtendableError extends Error {
1+
class TruffleError extends Error {
52
constructor(message: string) {
63
super(message);
74
this.name = this.constructor.name;
5+
this.stack = "";
86
}
97
}
108

11-
export = ExtendableError;
9+
export = TruffleError;

0 commit comments

Comments
 (0)