[gdal-dev] Towards more user-friendly error messages

Frank Warmerdam warmerdam at pobox.com
Sat Jun 20 08:12:39 EDT 2009


Even Rouault wrote:
> Ari,
> 
> It's funny because I myself got caught by the same issue a few days ago.
> So I've just improved error reporting on shapefile layer for SetFeature(), 
> CreateFeature() and DeleteFeature() operations in trunk (r17255). It was 
> trivial in that case as the OGRShapeLayer object has a flag to indicate if it 
> is opened in read-only or update mode.
> 
> I'm not sure there is a policy for error reporting and how it could be 
> formulated if there was one ! If we can make it clearer in situations where 
> it is not currently, just report it as you did.

Ari / Even,

My position is that the higher level methods like SetFeature(), CreateFeature()
etc ought to be checking read-only status and providing informative errors.
In general we need to try and issue informative errors at the highest
level we can for the sake of users and developers.

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/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list