id summary reporter owner description type status priority milestone component version severity resolution keywords cc 3153 Define OGRErr as enumerated type Mateusz Łoskot Mateusz Łoskot "This ticket is an enhancement request to re-define [/gdal/browser/trunk/gdal/ogr/ogr_core.h?rev=17602#L148 OGRErr] as enumerated type, similarly to [/gdal/browser/trunk/gdal/port/cpl_error.h?rev=17602#L48 CPLErr]. Thanks to strong-typed definition of CPLErr, it is possible to use this type as an exception type in C++ client code. It can be safely thrown and caught as an exception of distinct type. Unfortunately, this technique is not possible with OGRErr because OGRErr is an alias to int. Perhaps, upcoming 1.7.0 would be a good opportunity to re-define OGRErr. If clients use OGRErr consistently as they should and they don't assign any values that are out of range of OGR error code, nothing should break. IMHO, making OGRErr a strong and unique type would be more beneficial in long term, especially for C++ users." enhancement closed low OGR_SF svn-trunk normal wontfix