[−][src]Function sm_ext::safe_native_invoke
pub fn safe_native_invoke<F: FnOnce() -> Result<cell_t, Box<dyn Error>> + UnwindSafe>(
ctx: &IPluginContext,
f: F
) -> cell_t
Wrapper to invoke a native callback and translate a panic! or Err
return into a SourceMod error using IPluginContext::throw_native_error.
This is used internally by the #[native] attribute.