nested_try

Macro nested_try 

Source
macro_rules! nested_try {
    ($expr:expr) => { ... };
}
Expand description

Helper to perform the try operation over an inner value of a Result<Result<T, E>, U>, this will check an error of type Result<T, E> and return it as Ok(Err(E)) if it is.

This is useful because functions in Rune can return different kinds of errors. One is a critical error for the virtual machine, most typically VmErro. And another is a logical error that should be returned and handled by the program.