UNPKG

@etherspot/prime-sdk

Version:

Etherspot Prime (Account Abstraction) SDK

22 lines (21 loc) 663 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ErrorHandler = void 0; const constants_1 = require("./constants"); class ErrorHandler extends Error { constructor(error, code) { super(error); this.error = error; this.code = code; this.rawError = null; this.rawError = error; this.code = code; if (code) { this.message = constants_1.errorMsg[code.toString()]; if (constants_1.entryPointErrorMsg[error]) { this.message = constants_1.entryPointErrorMsg[error]; } } } } exports.ErrorHandler = ErrorHandler;