pub fn guard_or_null<T>(thunk_name: &str, f: impl FnOnce() -> *mut T) -> *mut TExpand description
Runs a closure under catch_unwind for thunks that return a raw pointer
where null already signals failure (create, clone_handle).
On panic, logs the message and returns null so the host can surface a recoverable error instead of the process aborting.