[gdal-dev] Add an option to allow opening datasets/datasources from SWIG bindings even in case of error ?

Even Rouault even.rouault at mines-paris.org
Wed Nov 30 15:20:46 EST 2011

Hi SWIG binding users/devs,

Any opinion on http://trac.osgeo.org/gdal/ticket/4360 ?

"""After the changes done in http://trac.osgeo.org/gdal/changeset/11529 / 
http://trac.osgeo.org/gdal/ticket/1635 , any CE_Failure error emitted by 
CPLError() in the Open() method of GDAL and OGR drivers, and not cleared, will 
cause the swig bindings to return a null dataset, even if the driver returned 
a valid one. 
Sometimes those errors are not critical, and users regularly complain (last 
occurrence is  http://lists.osgeo.org/pipermail/gdal-dev/2011-
November/030960.html ) that they can open them successfully with C/C++ API, 
but not from Java/Python/etc, so I'd suggest the following patch that adds a 
bIgnoreErrors option, that if turned on will reset the error flag in the case 
discussed here. By default, the new option is not turned on. """
Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111130/8ac653a6/attachment.html

More information about the gdal-dev mailing list