Function jaffi_support::exceptions::catch_panic_and_throw
source · [−]pub fn catch_panic_and_throw<F: FnOnce() -> R + UnwindSafe, R: NullObject>(
env: JNIEnv<'_>,
f: F
) -> R
Expand description
Catches and potential panics, and then converts them to a RuntimeException in Java.
R
- must implementDefault
in order to allow the (unused) default return value in the case of an exception