[QGIS-Developer] Calling for assistance - Windows MVSC builds not catching GEOS exceptions?

Nyall Dawson nyall.dawson at gmail.com
Fri Mar 2 16:18:44 PST 2018


On 2 March 2018 at 20:38, Jürgen E. Fischer <jef at norbit.de> wrote:
> Hi Hugo,
>
> On Fri, 02. Mar 2018 at 10:48:21 +0100, Hugo Mercier wrote:
>> I know there are some issues when an exception is thrown from a DLL compiled
>> with a different runtime version (i.e. different compiler version) than the
>> DLL/EXE trying to catch it.
>
>> https://stackoverflow.com/questions/5107948/throwing-c-exceptions-across-dll-boundaries
>
>> Could it be the case between geos and qgis ?
>
> Maybe.  Although the exception is thrown from the same DLL, there's stuff from
> others on the stack.
>
> The GEOS C-API should probably be changed to catch the exception within the C
> wrappers and return errors instead to fix this.

But in this case the exception is raised by QGIS itself - not geos.
Geos is just calling the QGIS throwGEOSException function, which
throws the GEOSException.

Or am I missing something here?

Nyall


More information about the QGIS-Developer mailing list