catch_panic 1.0.0

A helper macro for safe Java-Rust interop that "catches" Rust panics and rethrows them as Java exceptions.
Documentation
1
2
3
4
5
6
7
8
9
10
use catch_panic::catch_panic;
use jni::JNIEnv;
use jni::sys::jobject;

#[catch_panic]
fn no_default(_env: JNIEnv) -> jobject {
    panic!();
}

fn main() {}