Crate etrace[][src]

Macros

new_err

Creates a new error

new_err_from

Creates a new error by converting kind into the matching Error<T> (using a From-trait) and returns it (return Err(Error<T>))

new_err_with

Creates a new error containing the underlaying error

ok_or

Runs $code and returns either the unwrapped result or binds the error to $err and executes $or (or can then access the error using the identifier passed as $err)

rethrow_err

Creates a new error with a sub-error and returns it (return Err(created_error))

some_or

Runs an expression and returns either the unwrapped result or executes $or

throw_err

Creates a new error and returns it (return Err(created_error))

try_err

Runs an expression and returns either the unwrapped result or creates a new error with the returned error as sub-error and returns the new error (return Err(Error<T>))

try_err_from

Runs an expression and returns either the unwrapped result or converts the error into the matching Error<T> (using a From-trait) and returns it (return Err(Error<T>))

Structs

Error

A typed-error that contains the error-kind, description, the position (file, line) and an optional sub-error

WrappedError

A generic-error that contains the serialized error-kind, description, the position (file, line) and an optional sub-error