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 implement Default in order to allow the (unused) default return value in the case of an exception