Errors and failure
#9282
Description
Has the use of the failure
crate been considered lately?
Has replacing use of error_chain
been discussed considering the author would like to deprecate it?
Would it be ok to start importing failure
and using it within Parity?
I'm well aware that the error handling story in Rust is incomplete and I can completely understand any hesitance to start introducing new error handling conventions but I would strongly recommend beginning to standardize on the conventions introduced by failure
. It seems likely that something reasonably close to its current API will eventually become the preferred method.
Forgive me if I've missed a discussion about this somewhere other than #7077.
I'll also note that failure
can easily consume error_chain
(or other) errors which do not implement Sync
via the use of SyncError
. This will allow for a gradual and seamless transition.