rama_error

Macro error

Source
macro_rules! error {
    ($msg:literal $(,)?) => { ... };
    ($fmt:literal, $($arg:tt),+ $(,)?) => { ... };
    ($err:expr $(,)?) => { ... };
}
Expand description

A macro to create a new error from a string literal, formatted string, or an existing error.

See the module level documentation for more information.

ยงExamples

use rama_error::error;

let err = error!("An error occurred");
let err = error!("An error occurred: {}", 42);
let err = error!(std::io::Error::new(std::io::ErrorKind::Other, "oh no!"));