How does UnityEngine.AndroidJNISafe work? Is there some Reference?

In my error log I can see that an exception was caught in function UnityEngine.AndroidJNISafe.CheckException().

I was not able to find a reference on that class UnityEngine.AndroidJNISafe to discover how it works.

The closest reference I’ve found is on UnityEngine.AndroidJNI, but there is no hint on how CheckException() can work and how it handles the exception. My main concern is the stability of my app.

It links to my previous question, anyway, this is more general one.

Thanks for your help

AndroidJNISafe is an internal wrapper class. CheckException checks whether an exception occurred during a JNI call, and clears it if necessary (this ensures next JNI call does not cause a crash). I think it should be propagated as an AndroidJavaException to the script.

It should not affect the stability of an app, however you should realize that the call failed for some reason :slight_smile: It affects your app in the same way any other exception would affect.

Hope this helps.