macro_rules! generic_error {
($msg:literal $(,)?) => { ... };
($err:expr $(,)?) => { ... };
($fmt:expr, $($arg:tt)*) => { ... };
}Expand description
Macro for constructing a generic error.
The resulting value evaluates to GenericError, and can be construct from a string literal, a format string (with
arguments accepted, in the same order as std::format!), or a value which implements Debug and Display, such as
an existing error that implements std::error::Error.
When the value given implements std::error::Error, the source of the existing error value will be used as the
source of the error created by this macro.