Jeff Lockhart
10/11/2022, 6:19 PMstaticCFunction
called from C code. On Windows, the exception is propagated and I can catch it in Kotlin with a try/catch surrounding the call to the C code that calls the staticCFunction
. But on Linux, this exception is instead caught by the underlying C code and returned in the error code from the C function as an "unknown C++ exception".
I'm trying to determine if this difference in behavior is due to Kotlin/Native, the C library, or possibly the GCC/MinGW compilers. I'd like to have access to the original exception to keep the behavior consistent between the two platforms. Is there a difference between the way Kotlin/Native exceptions behave on Windows vs Linux?Jeff Lockhart
10/11/2022, 6:26 PMstaticCFunction
and save a global reference to a caught exception from within the staticCFunction
to then access from outside the call if the "unknown C++ exception" error is encountered.