Skip to main content

safe_native_invoke

Function safe_native_invoke 

Source
pub fn safe_native_invoke<F>(ctx: IPluginContextPtr, f: F) -> cell_t
Expand description

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.