-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
In v6
, we are introducing Web3Exception
and inheriting eth_utils.exceptions.ValidationError
across Web3ValidationError
, EthPMValidationError
and ENSValidationError
. We should document this hierarchy and give examples of why this is useful / how to fine tune exception handling moving forward.
i.e.
try:
...
# catch only validation errors within web3
except Web3ValidationError:
...
# catch all web3 errors, including web3 validation errors
except Web3Exception:
...
# catch all validation errors across the web3 library stack (still needs to be reflected in `eth-tester`, `eth-abi`, `eth-account`, etc)
except ValidationError:
...
Changes related to standardizing the ValidationError
will have to be coordinated for other libraries in the web3 stack:
- py-evm See: Unify
ValidationError
py-evm#1194 - eth-account
- eth-abi
- eth-tester
... ?
Metadata
Metadata
Assignees
Labels
No labels