Draft: add next-generation error trait
Rust's standard library's error trait leaves a lot to be desired, especially with regards to handling groups of errors and transparent wrappers over other errors. This is an attempt to fix that.
To-do list:
-
New error trait. -
Error forest traversal. -
Putcore
andng
modules behind feature flags. (Don't forget to test feature combinations.)- Too annoying, not doing this.
-
Decide whether Error
s should be cloneable (viadyn-clone
).- I've dropped
dyn-clone
because it currently requiresalloc
rather than justcore
. Maybe acore
-onlydyn-clone
is possible since theClone
trait is actually incore
, but I dunno. Anyway, it would be really nice if this new error trait wascore
-only, which meansdyn-clone
has to go away.
- I've dropped
-
Add impl<E: Error + ?Sized> Error for SmartPointer<E>
impls. -
Add a compatibility newtype wrapper for core::error::Error
. -
Convenience functions for formatting/printing an error forest. -
Support downcasting. -
Procedural macro for implementing Error
onstruct
s andenum
s. -
More?
Edited by Charles Hall