Commit Graph

18 Commits

Author SHA1 Message Date
Michael Pfaff 71385c9e19
Support nested details, add with_backtrace method to IntoContext, impl IntoContext for Detail 2023-07-02 12:07:00 -04:00
Michael Pfaff 184b334a09
Add push_extra method to Context 2023-07-01 21:37:34 -04:00
Michael Pfaff c56927e7a4
Adjust formatting 2023-07-01 13:14:28 -04:00
Michael Pfaff 0e0eaa8d2e
Add IntoContext and Explain for Arc<dyn Error> 2023-07-01 13:11:42 -04:00
Michael Pfaff 8a055af669
Optional feature to wrap backtrace in an Arc to enable a full Clone impl 2023-07-01 12:58:07 -04:00
Michael Pfaff c945f1241e
Implement IntoContext for Arc<Error> 2023-07-01 12:45:30 -04:00
Michael Pfaff db067003d8
Expose Detail
- Add some accessor methods on `Context`
- Wrap some variants in private structs to prevent people from depending
  on them
- Add some #[inline]
2023-07-01 12:37:14 -04:00
Michael Pfaff 52bcd3c17b
Fixed some formatting bugs 2023-07-01 11:41:39 -04:00
Michael Pfaff 8f1c7d9765
Refactored Context 2023-07-01 11:41:21 -04:00
Michael Pfaff 55054597d1
Move Sized bound to the IntoContext trait and add with_caller method 2023-07-01 11:21:37 -04:00
Michael Pfaff 457328945c
Rename ContextElem to Detail 2023-06-29 11:55:21 -04:00
Michael Pfaff 639e5835e4
Add an Error element 2023-06-29 11:48:51 -04:00
Michael Pfaff f416f66d5c
Move Backtrace to a context element, capture along with Location 2023-06-29 02:14:03 -04:00
Michael Pfaff 9950d96522
Improved output and API
- New and improved output format
- Adjusted context API to go along with it
- Nicer output for termination
- Better example
- Better handling of backtraces
- Removed a silly field that is never used
- `How::location` now returns the actual location instead of the context
  element
- `Location::caller` is now additionally captured for every call to
  `How::context`
- Added a feature that implements `Clone` for `How` (by deferring to the
  existing `clone_without_backtrace` method)
2023-06-29 00:00:42 -04:00
Michael Pfaff bbc7df28d8
Refactoring, improve output 2023-01-17 07:29:58 -05:00
Michael Pfaff d3bd38ba13
Some changes 2022-09-06 07:47:11 -04:00
Michael Pfaff a3058961f8
Seems good 2022-07-21 20:40:44 -04:00
Michael Pfaff fdb14c22ec
Where was I? 2022-07-21 20:39:47 -04:00