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, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev