mirror of
https://github.com/status-im/nim-ethers.git
synced 2025-01-12 16:44:23 +00:00
d88e4614b1
Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
21 lines
456 B
Nim
21 lines
456 B
Nim
import ./basics
|
|
|
|
type
|
|
SolidityError* = object of EthersError
|
|
ContractError* = object of EthersError
|
|
SignerError* = object of EthersError
|
|
SubscriptionError* = object of EthersError
|
|
ProviderError* = object of EthersError
|
|
data*: ?seq[byte]
|
|
|
|
{.push raises:[].}
|
|
|
|
proc toErr*[E1: ref CatchableError, E2: EthersError](
|
|
e1: E1,
|
|
_: type E2,
|
|
msg: string = e1.msg): ref E2 =
|
|
|
|
return newException(E2, msg, e1)
|
|
|
|
template errors*(types) {.pragma.}
|