On Fri Sep 22 15:55:16 2023 +0000, Aidan Khoury wrote:
You're right, I checked again and this exception is captured and gracefully fails with the last error code set to 0xE0000001. So, I will remove this and just set the last error 0xE0000001 with a failing return value. I'll add some tests for this case.
this can also be done by setting an exception handler inside some functions
(in badly written pseudo code):
``` try { // do the expected stuff // setting ret & last error in case of error } catch (exception e) { throw exception(0xE0000001); ret = FALSE; SetLastError(0xE0000001); } return ret; ```
but that doesn't prevent from releasing the resources between the throw and this handler (we're not using RAEII and the current exception handling even for C code requires compiler support that we don't have)
so perhaps the safest solution is to return error codes internally (no exception) and throw the exception on top level functions
that's not nice for sure, but I fear we don't have many other options