Re: [gdal-dev] Throwing exceptions in GDAL Error Handler

2021-12-06 Thread Simon Eves
OK, thanks for confirming. On Sat, Dec 4, 2021 at 3:59 PM Even Rouault wrote: > You shouldn't throw C++ exceptions, as this is a callback of the C API. > This will cause all sort of issues, most of the time memory leaks, etc. > Le 05/12/2021 à 00:49, Simon Eves a écrit : > > We have a custom Err

Re: [gdal-dev] Throwing exceptions in GDAL Error Handler

2021-12-04 Thread Even Rouault
You shouldn't throw C++ exceptions, as this is a callback of the C API. This will cause all sort of issues, most of the time memory leaks, etc. Le 05/12/2021 à 00:49, Simon Eves a écrit : We have a custom Error Handler callback and for a while now it was configured to throw an exception if the

[gdal-dev] Throwing exceptions in GDAL Error Handler

2021-12-04 Thread Simon Eves
We have a custom Error Handler callback and for a while now it was configured to throw an exception if the class was Failure or higher. Unfortunately, we have found that this causes havoc with OpenEx() because the file management state is left bad (e.g. the anti-recursion stuff) and GDAL will beli