mirror of
https://github.com/lil-org/wallet.git
synced 2025-01-06 04:13:11 +03:00
19 lines
353 B
JavaScript
19 lines
353 B
JavaScript
// ∅ 2024 lil org
|
|
// Rewrite of error.js from trust-web3-provider.
|
|
|
|
"use strict";
|
|
|
|
class ProviderRpcError extends Error {
|
|
constructor(code, message) {
|
|
super();
|
|
this.code = code;
|
|
this.message = message;
|
|
}
|
|
|
|
toString() {
|
|
return `${this.message} (${this.code})`;
|
|
}
|
|
}
|
|
|
|
module.exports = ProviderRpcError;
|