flex-error
Flexible error definitions using macros and traits
0.4.4
5.6M downloads/mo
#4308 most downloaded on crates.io
informalsystems/flex-error
What this package is like to depend on
Last release 5 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 weeks
Most releases are documented
notes for 8 of 11 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
11 releases · first in 2021
0 releases in the last 12 months
see the full history below
Release timeline
11 releases · May 2021 to Oct 2021Releases
latest 11-
0.4.420 Oct 2021Release notes
Open source →Use `E: Display + Debug` trait bound for `ErrorTracer<E>`
for eyre and anyhow tracers
Release notes
Open source →- Use
E: Display + Debug + Send + Sync + 'statictrait bound forErrorTracer<E>for eyre and anyhow tracers. The originalE: std::error::Error + Send + Sync + 'statictrait bound do not work well when individual crates havestdfeatures disabled, but hadflex-error'sstdfeature enabled somehow.
- Use
-
0.4.327 Sep 2021Release notes
Open source →- Add
into_detailandinto_tracemethods to error types defined bydefine_error!. - Export local alias to
std::error::Errorso thatstddo not need to be available in user crate whendefine_error!is called.
- Add
-
0.4.203 Aug 2021Release notes
Open source →- Make the
Displayimplementation of error types useDebugto display error traces fromeyreand other error tracers.
- Make the
-
0.4.126 Jul 2021Release notes
Open source →Breaking changes:
- The
impldefinition forstd::error::Erroris now generated based on whether thestdfeature is enabled on theflex-errorcrate, instead of the user crate that callsdefine_error.
- The
-
0.4.023 Jul 2021Release notes
Open source →Breaking changes:
-
Define main error types in the form of
struct Error(ErrorDetail, Trace)instead of the type aliastype Error = ErrorReport<ErrorDetail, Trace>. -
Remove auto derive of common traits such as
CloneandEqfor the main error type. Users can instead implement the traits explicitly since it is no longer a type alias. -
Change the error constructor convention from
error::constructor_error()toerror::Error::constructor(). -
Allow multiple attributes to be given to main and sub errors in
define_error!.
-
-
0.3.006 Jul 2021Release notes
Open source →Breaking changes:
-
Update structure of
ErrorReportfromErrorReport { detail, trace }toErrorReport(detail, trace)to allow simpler pattern matching. -
Auto derive common traits such as
CloneandEqforErrorReport. -
Allow recursive error source using
Self.
-
-
0.2.121 Jun 2021Nothing published for this version
-
0.2.008 Jun 2021Release notes
Open source →Breaking changes:
-
Update define syntax from
define_error!{ Error; ... }todefine_error!{ Error { ... } } -
Allow custom derive attributes in the form of
define_error!{ #[derive(Debug, ...)] Error { ... } }.
-
-
0.1.207 Jun 2021Nothing published for this version
-
0.1.127 May 2021Nothing published for this version
-
0.1.025 May 2021