Closed lo48576 closed 4 years ago
Closed by c99727523d9c5ffc40ff041ad02373b8168882f2.
Released 0.0.5.
As experiment, I created and replaced some types locally, but it seems to end up in creating struct FooError { msg: String }
or something like that, and I don't feel it is better than anyhow::Error
, so I abandoned that branch.
Additionally, current API is not stable, so creating dedicated error type would reduce flexibility of API.
In conclusion, I don't think I should remove anyhow
or should stop using anyhow::Error
, at least for now.
failure
depends onbacktrace
crate whenstd
feature is enabled, but it prevents me from testing dependencies with minimal versions (bycargo +nightly update -Z minimal-versions && cargo test --all-features
). (See https://github.com/rust-lang-nursery/failure/pull/310 for detail.)Additionally, std
Error
trait are being improved and it would be useful enough (see https://github.com/rust-lang/rust/issues/53487). So it would be better to use simpler error types, rather than error types with many features and extra APIs, to avoid providing unnecessary functionalities and keeping their compatibilities.I'll use
anyhow
orthiserror
, but it is not yet decided.