Exhaustively define error types to improve correctness (security and stability) and maintainability #3851
Labels
A-chain
Area: Chain, client & related
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
C-epic
Category: an epic
C-housekeeping
Category: Refactoring, cleanups, code quality
T-public-interfaces
Team: issues relevant to the public interfaces team
Ideally, every function should return only what it can potentially return, meaning that there should not be a huge enum with all possible errors in the world (like
ErrorKind
in chain), instead, there should be granular types (it can even be just a struct, not an enum, e.g. in Rust standard library there isAddrParseError
, which isstruct AddrParseError(())
)#3788 (comment)
Pros:
Cons:
The text was updated successfully, but these errors were encountered: