dodorare / crossbow

Cross-Platform build tools and toolkit for games and game engines written in Rust! 🦀
https://crossbow.dodorare.com/
Apache License 2.0
198 stars 13 forks source link

Fix exception handling on crossbow-android platform #130

Closed enfipy closed 2 years ago

enfipy commented 2 years ago

Objective

Currently, Android Java Exceptions are not handled properly and resulting in ugly panics.

What problem does this solve, or what need does it fill?

Problem with Exception handling in Rust calls to Java.

What solution would you like?

Use this approach:

// ...call_method...
jnienv.exception_check()?;

Read more in this StackOverflow question and jni docs.