[GRASS-SVN] r70245 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 4 06:34:23 PST 2017
Author: martinl
Date: 2017-01-04 06:34:23 -0800 (Wed, 04 Jan 2017)
New Revision: 70245
Modified:
grass/trunk/lib/vector/Vlib/build_ogr.c
Log:
vlib/ogr: be quiet when trying to commit transaction (probably there is no active)
Modified: grass/trunk/lib/vector/Vlib/build_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_ogr.c 2017-01-04 14:18:12 UTC (rev 70244)
+++ grass/trunk/lib/vector/Vlib/build_ogr.c 2017-01-04 14:34:23 UTC (rev 70245)
@@ -25,6 +25,7 @@
#ifdef HAVE_OGR
#include <ogr_api.h>
+#include <cpl_error.h>
#endif
#include "local_proto.h"
@@ -72,8 +73,12 @@
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)) {
More information about the grass-commit
mailing list