|
@@ -25,6 +25,7 @@
|
|
|
|
|
|
#ifdef HAVE_OGR
|
|
|
#include <ogr_api.h>
|
|
|
+#include <cpl_error.h>
|
|
|
#endif
|
|
|
|
|
|
#include "local_proto.h"
|
|
@@ -72,8 +73,12 @@ int Vect_build_ogr(struct Map_info *Map, int build)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- if (OGR_L_TestCapability(ogr_info->layer, OLCTransactions))
|
|
|
- OGR_L_CommitTransaction(ogr_info->layer);
|
|
|
+ if (OGR_L_TestCapability(ogr_info->layer, OLCTransactions)) {
|
|
|
+ CPLPushErrorHandler(CPLQuietErrorHandler);
|
|
|
+ if (OGR_L_CommitTransaction(ogr_info->layer) != OGRERR_NONE)
|
|
|
+ G_debug(1, "Unable to commit transation");
|
|
|
+ CPLPushErrorHandler(CPLDefaultErrorHandler);
|
|
|
+ }
|
|
|
|
|
|
/* test layer capabilities */
|
|
|
if (!OGR_L_TestCapability(ogr_info->layer, OLCRandomRead)) {
|