Macro ensure
Source macro_rules! ensure {
($cond:expr, $error_kind:expr, $fmt:expr $(, $args:expr)* $(,)?) => { ... };
}
Expand description
Create a new error with file/line info attached
This macro automatically appends file/line info to the traceback
§Arguments
kind - The kind of the error
msg - The message of the error
args - The posisble format arguments
§Returns
Result<(), Error> - The result of the safe call