Expand description
A small library which provides convenient, non-panicking error handling for small CLI scripts.
Macros§
- ccheck
- Like
assert!
but instead of panicking it early-returns anError
with a given description (which can be specified usingformat_args!
syntax). - ctry
- Like
try!
, but in the error case the error is wrapped in anError
with a given description (which can be specified usingformat_args!
syntax).
Structs§
- Error
- A minimalist error type to use in CLI scripts: it wraps an arbitrary cause which implements
std::error::Error
and a description for theDisplay
implementation.
Traits§
- Describe
Err - A trait which enables adding a description to any
Result
by wrapping its error type in anError
Functions§
- run_
and_ exit - Runs a
Result
-returning function and exits the process with 0 if successful.