Open mojo2012 opened 5 years ago
That would be useful. Your approach looks fine. With anything JNI related, there may be some corner cases that make it more difficult, but you'll have to wait for those cases to present themselves.
I'll try to produce a test scenario and make a PR. Btw, it would be awesome to have the library on maven central!
Hi there,
I'm trying to implement a generic error handling in the native library like this:
And wrapped all functions/methods/selectors in
WLJavaProxy.m
into this try catch:The hope was that for any error that occurred in native code, the VM would not crash but rather show a
RuntimeException
.Is this the correct approach to do this? It would be nice to have such a thing to prevent crashes!