Bläddra i källkod

v.out.ogr

"Failed to create OGR feature": G_warning -> G_fatal_error

v.out.ogr should not finish successfully if exporting a feature failed because the output will not contain all the features it should contain
Markus Metz 5 år sedan
förälder
incheckning
535ac07662
2 ändrade filer med 6 tillägg och 6 borttagningar
  1. 3 3
      vector/v.out.ogr/export_areas.c
  2. 3 3
      vector/v.out.ogr/export_lines.c

+ 3 - 3
vector/v.out.ogr/export_areas.c

@@ -123,7 +123,7 @@ int export_areas_single(struct Map_info *In, int field, int donocat,
             mk_att(cat, Fi, driver, ncol, colctype, colname, doatt, nocat,
                    Ogr_feature, n_noatt);
             if (OGR_L_CreateFeature(Ogr_layer, Ogr_feature) != OGRERR_NONE ) {
-		G_warning(_("Failed to create OGR feature"));
+		G_fatal_error(_("Failed to create OGR feature"));
 	    }
 	    else
 		n_exported++;
@@ -224,7 +224,7 @@ int export_areas_multi(struct Map_info *In, int field, int donocat,
             mk_att(cat, Fi, driver, ncol, colctype, colname, doatt, nocat,
                    Ogr_feature, n_noatt);
             if (OGR_L_CreateFeature(Ogr_layer, Ogr_feature) != OGRERR_NONE ) {
-		G_warning(_("Failed to create OGR feature"));
+		G_fatal_error(_("Failed to create OGR feature"));
 	    }
 	    else
 		n_exported++;
@@ -275,7 +275,7 @@ int export_areas_multi(struct Map_info *In, int field, int donocat,
         mk_att(cat, Fi, driver, ncol, colctype, colname, doatt, nocat,
                Ogr_feature, n_noatt);
 	if (OGR_L_CreateFeature(Ogr_layer, Ogr_feature) != OGRERR_NONE ) {
-	    G_warning(_("Failed to create OGR feature"));
+	    G_fatal_error(_("Failed to create OGR feature"));
 	}
 	else
 	    n_exported++;

+ 3 - 3
vector/v.out.ogr/export_lines.c

@@ -132,7 +132,7 @@ int export_lines_single(struct Map_info *In, int field, int otype, int donocat,
             mk_att(cat, Fi, driver, ncol, colctype, colname, doatt, nocat,
                    Ogr_feature, n_noatt);
             if (OGR_L_CreateFeature(Ogr_layer, Ogr_feature) != OGRERR_NONE ) {
-		G_warning(_("Failed to create OGR feature"));
+		G_fatal_error(_("Failed to create OGR feature"));
 	    }
 	    else
 		n_exported++;
@@ -228,7 +228,7 @@ int export_lines_multi(struct Map_info *In, int field, int otype, int donocat, i
             mk_att(cat, Fi, driver, ncol, colctype, colname, doatt, nocat,
                    Ogr_feature, n_noatt);
             if (OGR_L_CreateFeature(Ogr_layer, Ogr_feature) != OGRERR_NONE ) {
-		G_warning(_("Failed to create OGR feature"));
+		G_fatal_error(_("Failed to create OGR feature"));
 	    }
 	    else
 		n_exported++;
@@ -277,7 +277,7 @@ int export_lines_multi(struct Map_info *In, int field, int otype, int donocat, i
         mk_att(cat, Fi, driver, ncol, colctype, colname, doatt, nocat,
                Ogr_feature, n_noatt);
 	if (OGR_L_CreateFeature(Ogr_layer, Ogr_feature) != OGRERR_NONE ) {
-	    G_warning(_("Failed to create OGR feature"));
+	    G_fatal_error(_("Failed to create OGR feature"));
 	}
 	else
 	    n_exported++;