On Fri Sep 22 16:35:17 2023 +0000, eric pouech wrote:
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
Handled in 15784da9