macro_rules! bail {
($($arg:tt)*) => { ... };
}Expand description
Log error message and return from function
This macro expands to the following code:
return Err({
report::Report::error(format_args!(args));
report::Error
})ยงExample
use report::{bail, Result};
fn function() -> Result {
bail!("Error message")
}