Is there a good way to hook into the konan excepti...
# kotlin-native
l
Is there a good way to hook into the konan exception handler? I have a callback C method that I want to be able to throw exceptions from in the JNI, then catch and convert it to a java exception. I have this mechanism in place for blocking methods, but I can’t catch an exception from a callback lambda
Basically, this C library lets me set a custom logger callback. I’m using a staticCFunction and when the level is ‘error’, I want to throw an exception so my K/JVM code can handle it.
n
Uses cases involving JNI aren't officially supported by Kotlin Native.