Attribute Macro relay_ffi_macros::catch_unwind

source ·
#[catch_unwind]
Expand description

Captures errors and panics in a thread-local on unsafe functions.

See relay-ffi documentation for more information.

§Examples

use relay_ffi::catch_unwind;

#[no_mangle]
#[catch_unwind]
pub unsafe extern "C" fn run_ffi() -> i32 {
    "invalid".parse()?
}