Skip to main content

try_cb

Macro try_cb 

Source
macro_rules! try_cb {
    ($result:expr, $user_data:expr, $cb:expr) => { ... };
}
Expand description

Given a result, calls the callback if it is an error, otherwise produces the wrapped value. Should be called within catch_unwind, so returns None on error.

The error must implement Debug + Display.