[−][src]Crate dynerr
Some macros to help with dynamic error handling/logging.
The goal of this crate is to unify all error types without compromising type safety.
The main features of this crate are the dynerr!
and dynmatch!
macros. when used alongside the return type DynResult<T>
, they allows you to return multiple error types from a function then easily match for them during your error handling. Using dynerr, theres no need to ever wrap errors.
Macros
check | Shortcut for .unwrap_or_else(|e| logged_panic!(e)) for DynResult. |
clean | deletes the supplied log file. |
dynerr | A macro for returning custom errors as DynError. |
dynmatch | Performs a dynamic match operation on multiple error types. |
log | Appends [event] to file. |
logged_panic | Appends [event] to file then panics. |
Functions
clean_log | deletes the supplied file |
log | Appends [event] to [log_file]. |
Type Definitions
DynError | type alias for an error returned by |
DynResult | An alias for result that uses DynError |