Macro concordium_std::bail

source ·
macro_rules! bail {
    () => { ... };
    ($arg:expr) => { ... };
}
Expand description

The bail macro can be used for cleaner error handling. If the function has result type Result invoking bail will terminate execution early with an error. If an argument is supplied, this will be used as the error, otherwise it requires the type E in Result<_, E> to implement the Default trait.