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 anErrorwith a given description (which can be specified usingformat_args!syntax). - ctry
- Like
try!, but in the error case the error is wrapped in anErrorwith 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::Errorand a description for theDisplayimplementation.
Traits§
- Describe
Err - A trait which enables adding a description to any
Resultby wrapping its error type in anError
Functions§
- run_
and_ exit - Runs a
Result-returning function and exits the process with 0 if successful.