Macro concordium_std::ensure
source · macro_rules! ensure {
($p:expr) => { ... };
($p:expr, $arg:expr) => { ... };
}
Expand description
The ensure
macro can be used for cleaner error handling. It is analogous
to assert
, but instead of panicking it uses bail
to terminate execution
of the function early.