[gdal-dev] Python bindings: enabling exceptions by default?

Even Rouault even.rouault at spatialys.com
Fri Mar 24 07:23:28 PDT 2023


Hi,

https://github.com/OSGeo/gdal/pull/7475 has now been merged into master. 
The UseExceptions()/DontUseExceptions() methods when invoked from one 
module also affect all other gdal, ogr, osr, gnm modules at once (that 
is now gdal.UseExceptions() is equivalent to gdal.UseExceptions() + 
ogr.UseExceptions() + osr.UseExceptions() + gnm.UseExceptions())

Even

Le 21/03/2023 à 18:21, Even Rouault a écrit :
> Hi,
>
> Given the feedback received, I've amended the pull request with an 
> extra commit to disable exceptions by default, except in autotest/ and 
> scripts. And emit a FutureWarning if exceptions have not been 
> explicitly enabled or disabled. So this will test the 
> exceptions-by-default mode in the GDAL code base without imposing it 
> to external code, and warning such external code that behaviour will 
> change in the future
>
> Even
>
> Le 19/03/2023 à 13:34, Even Rouault a écrit :
>> Hi,
>>
>> I've prepared a pull request that does the above, but this raises a 
>> number of questions. See my longish comment at 
>> https://github.com/OSGeo/gdal/pull/7475#issuecomment-1475239852. 
>> Thoughts appreciated
>>
>> Even
>>
-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list