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
use catch_panic::catch_panic;
use jni::JNIEnv;

#[catch_panic(handler = "accepting panic donations --> |_|")]
fn invalid_handler(_env: JNIEnv) {
    panic!();
}

fn main() {}