-
-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
The downstream experience isn't great here currently; if parsing returns an error, you just get a ReflectError::OperationFailed
that tells you that parsing failed, which doesn't communicate anything about why it failed.
I'm aware that this is very much a non-trivial problem; the options I can think of don't seem particularly great:
- Allow the error type to be reflected:
- Requires
Facet
be derived by the error type - Requires downstream users to consider how they want to handle error types
- Requires
- Impose mandatory trait bounds on FromStr::Error
- Limits usefulness; not all
FromStr::Error
implementstd::error::Error
orDisplay
- Restricts how errors may be used
- Limits usefulness; not all
- Add additional vtable entries for
FromStr where FromStr::Error: Display
and/orFromStr where FromStr::Error: std::error::Error
- Bloats VTable size when downstream users are likely to only use one variant
Metadata
Metadata
Assignees
Labels
No labels