web3-errors
Advanced tools
Comparing version 1.3.1-dev.04da324.0 to 1.3.1-dev.0681f97.0
@@ -71,3 +71,3 @@ import { JsonRpcError, TransactionReceipt, HexString } from 'web3-types'; | ||
} | ||
export type ProviderErrorData = HexString | { | ||
export declare type ProviderErrorData = HexString | { | ||
data: HexString; | ||
@@ -104,5 +104,7 @@ } | { | ||
data: string; | ||
errorName?: string; | ||
errorSignature?: string; | ||
errorArgs?: { [K in string]: unknown; }; | ||
errorName?: string | undefined; | ||
errorSignature?: string | undefined; | ||
errorArgs?: { | ||
[x: string]: unknown; | ||
} | undefined; | ||
}; | ||
@@ -109,0 +111,0 @@ } |
@@ -25,2 +25,19 @@ "use strict"; | ||
class BaseWeb3Error extends Error { | ||
constructor(msg, cause) { | ||
super(msg); | ||
if (Array.isArray(cause)) { | ||
// eslint-disable-next-line no-use-before-define | ||
this.cause = new MultipleErrors(cause); | ||
} | ||
else { | ||
this.cause = cause; | ||
} | ||
this.name = this.constructor.name; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(new.target.constructor); | ||
} | ||
else { | ||
this.stack = new Error().stack; | ||
} | ||
} | ||
/** | ||
@@ -48,19 +65,2 @@ * @deprecated Use the `cause` property instead. | ||
} | ||
constructor(msg, cause) { | ||
super(msg); | ||
if (Array.isArray(cause)) { | ||
// eslint-disable-next-line no-use-before-define | ||
this.cause = new MultipleErrors(cause); | ||
} | ||
else { | ||
this.cause = cause; | ||
} | ||
this.name = this.constructor.name; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(new.target.constructor); | ||
} | ||
else { | ||
this.stack = new Error().stack; | ||
} | ||
} | ||
static convertToString(value, unquotValue = false) { | ||
@@ -67,0 +67,0 @@ // Using "null" value intentionally for validation |
@@ -22,2 +22,19 @@ /* | ||
export class BaseWeb3Error extends Error { | ||
constructor(msg, cause) { | ||
super(msg); | ||
if (Array.isArray(cause)) { | ||
// eslint-disable-next-line no-use-before-define | ||
this.cause = new MultipleErrors(cause); | ||
} | ||
else { | ||
this.cause = cause; | ||
} | ||
this.name = this.constructor.name; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(new.target.constructor); | ||
} | ||
else { | ||
this.stack = new Error().stack; | ||
} | ||
} | ||
/** | ||
@@ -45,19 +62,2 @@ * @deprecated Use the `cause` property instead. | ||
} | ||
constructor(msg, cause) { | ||
super(msg); | ||
if (Array.isArray(cause)) { | ||
// eslint-disable-next-line no-use-before-define | ||
this.cause = new MultipleErrors(cause); | ||
} | ||
else { | ||
this.cause = cause; | ||
} | ||
this.name = this.constructor.name; | ||
if (typeof Error.captureStackTrace === 'function') { | ||
Error.captureStackTrace(new.target.constructor); | ||
} | ||
else { | ||
this.stack = new Error().stack; | ||
} | ||
} | ||
static convertToString(value, unquotValue = false) { | ||
@@ -64,0 +64,0 @@ // Using "null" value intentionally for validation |
@@ -71,3 +71,3 @@ import { JsonRpcError, TransactionReceipt, HexString } from 'web3-types'; | ||
} | ||
export type ProviderErrorData = HexString | { | ||
export declare type ProviderErrorData = HexString | { | ||
data: HexString; | ||
@@ -104,5 +104,7 @@ } | { | ||
data: string; | ||
errorName?: string; | ||
errorSignature?: string; | ||
errorArgs?: { [K in string]: unknown; }; | ||
errorName?: string | undefined; | ||
errorSignature?: string | undefined; | ||
errorArgs?: { | ||
[x: string]: unknown; | ||
} | undefined; | ||
}; | ||
@@ -109,0 +111,0 @@ } |
{ | ||
"name": "web3-errors", | ||
"version": "1.3.1-dev.04da324.0+04da324", | ||
"version": "1.3.1-dev.0681f97.0+0681f97", | ||
"description": "This package has web3 error classes", | ||
@@ -44,3 +44,3 @@ "main": "./lib/commonjs/index.js", | ||
"dependencies": { | ||
"web3-types": "1.8.1-dev.04da324.0+04da324" | ||
"web3-types": "1.8.2-dev.0681f97.0+0681f97" | ||
}, | ||
@@ -59,5 +59,5 @@ "devDependencies": { | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.5.4" | ||
"typescript": "^4.7.4" | ||
}, | ||
"gitHead": "04da324744d2e8d8b358cd4ccf0e97c08d635be3" | ||
"gitHead": "0681f97ed9daa592f86c8d8100d8802f706d046d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
7466
416459
141