macro_rules! bail {
($ec:expr => $($msg:tt)*) => { ... };
($($msg:tt)*) => { ... };
}Expand description
Macro to return early with a Err(HyperlightGuestError).
Usage:
ⓘ
bail!(ErrorCode::UnknownError => "An error occurred: {}", details);
// or
bail!("A guest error occurred: {}", details); // defaults to ErrorCode::GuestError