Macro bail
Source macro_rules! bail {
($err:expr) => { ... };
($fmt:expr, $($arg:tt)*) => { ... };
}
Expand description
Returns early with an Error.
ยงExamples
use fory_core::bail;
use fory_core::error::Error;
fn fail_fast() -> Result<(), Error> {
bail!("something went wrong");
}