Skip to content

Commit

Permalink
util: update base error class
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer committed Feb 10, 2025
1 parent 70b2df5 commit ec01f1b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/util/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ export type EthereumJSErrorObject = {
*/
export class EthereumJSError<T extends { code: string }> extends Error {
type: T
code: string // TODO likely remove this and for error inspection inspect `error.type.code` (like Lodestar)
constructor(type: T, message?: string, stack?: string) {
super(message ?? type.code)
this.type = type
this.code = type.code
if (stack !== undefined) this.stack = stack
}

Expand Down

0 comments on commit ec01f1b

Please sign in to comment.