<div dir="ltr"><div>Whenever C code uses exceptions (in my case raised by `RaiseException` (windows) or `_Unwind_RaiseException` (linux)) and java takes control of the execution, it crashes the VM with an "Internal Error" message.<br>I'm using bindings for LuaJIT, and it raises exceptions quite a lot for the purpose of stack unwinding. Most of them are easy to avoid: errors and yields can be simply wrapped by a C function so that java doesn't see it, but others, signaling for Out Of Memory, are not so straightforward.<br>Is there a way to handle (perhaps, convert to a Java Exception?) these native exceptions before Java crashes the VM, given that the error code is known? If not, is it planned/possible in the future?<br>I have little experience in this kind of problem: in fact, my only experience is trying to deal with it, so be free to call out the wrong terminology and/or approach. I have been searching for a solution [what seems to be] everywhere, but I haven't found anyone with the same problem.<br><br></div></div>