Macro wasmflow_macros::ensure
source · [−]macro_rules! ensure {
($cond:expr, $msg:literal $(,)?) => { ... };
($cond:expr, $err:expr $(,)?) => { ... };
($cond:expr, $fmt:expr, $($arg:tt)*) => { ... };
}
Expand description
Test a condition and if it is false, return the supplied error. It’s like an assert! that doesn’t panic.