Opened 12 years ago

Closed 5 years ago

#4360 closed defect (wontfix)

[PATCH] gdal/ogr Open() methods return null datasets if an error is triggered

Reported by: Even Rouault Owned by: hobu
Priority: normal Milestone: closed_because_of_github_migration
Component: SWIG (all bindings) Version: unspecified
Severity: normal Keywords:
Cc:

Description

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.

Attachments (1)

ticket_4360.patch (4.5 KB ) - added by Even Rouault 12 years ago.

Download all attachments as: .zip

Change History (4)

by Even Rouault, 12 years ago

Attachment: ticket_4360.patch added

comment:1 by Even Rouault, 12 years ago

Summary: gdal/ogr Open() methods return null datasets if an error is triggered[PATCH] gdal/ogr Open() methods return null datasets if an error is triggered

comment:2 by Even Rouault, 6 years ago

Was adressed for Python per #7094

comment:3 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.