[gdal-dev] Lost error messages

Ray at Daylon rayg at daylongraphics.com
Mon Jan 29 20:43:30 PST 2024


I was tracing through the TIGER/Line OGR driver and noticed that
it calls OGRTigerDataSource::Open with the bTestOpen parameter
set to TRUE, causing that function to skip calling CPLError
and only return FALSE if an error happens.

This causes an interesting situation: an app can have the TIGER driver 
fail, but not be told why. Calling CPLGetLastErrorXXX doesn't help 
because no error condition was formally reported.

Is there a reason why bTestOpen is set to TRUE? Shouldn't
full error reporting be the default? If this parameter is
important, shouldn't it be part of the driver API so an app
can set it to get errors described?

Curious,
Ray Gardener



More information about the gdal-dev mailing list