[gdal-dev] Re: Add an option to allow opening
datasets/datasources from SWIG bindings even in case of error ?
Frank Warmerdam
warmerdam at pobox.com
Fri Dec 2 01:29:48 EST 2011
>> But is there a way to test for failure state and convert it into a
>> warning? I don't mean changing anything in GDAL itself, only add some
>> clever code into the bindings? Clearing the failure state is possible,
>> could we fetch the error message and raise a warning?
Folks,
For reference, I believe the bindings should behave specially
for GDALOpen and OGROpen and that they ought to *not* through
an exception even if an error was set as long as the function
returns a non-NULL pointer.
Unfortunately I find the bindings logic challenging at times,
and I don't want to step on the toes of the bindings maintainers,
so I have not tried to apply my approach.
I agree with the poster who suggesting having an "ignore errors"
flag for open isn't a great solution. It just further complicates
something that doesn't really need to be complicated.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/warmerda
and watch the world go round - Rush | Geospatial Software Developer
More information about the gdal-dev
mailing list