[GRASS-SVN] r51139 - grass/trunk/vector/v.edit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 21 19:33:54 EDT 2012


Author: martinl
Date: 2012-03-21 16:33:53 -0700 (Wed, 21 Mar 2012)
New Revision: 51139

Modified:
   grass/trunk/vector/v.edit/main.c
Log:
v.edit: better error handling (tool=create)


Modified: grass/trunk/vector/v.edit/main.c
===================================================================
--- grass/trunk/vector/v.edit/main.c	2012-03-21 23:25:59 UTC (rev 51138)
+++ grass/trunk/vector/v.edit/main.c	2012-03-21 23:33:53 UTC (rev 51139)
@@ -112,9 +112,12 @@
 		G_fatal_error(_("Supported feature type for OGR layer: "
 				"%s, %s or %s"), "point", "line", "boundary");
 	    if (map_type == GV_FORMAT_POSTGIS)
-		V2_open_new_pg(&Map, type);
+		ret = V2_open_new_pg(&Map, type);
 	    else
-		V2_open_new_ogr(&Map, type);
+		ret = V2_open_new_ogr(&Map, type);
+	    if (ret != 0)
+		G_fatal_error(_("Unable to create vector map <%s>"),
+			      params.map->answer);
 	}
 	
 	G_debug(1, "Map created");



More information about the grass-commit mailing list