浏览代码

v.edit: better error handling (tool=create)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51139 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 年之前
父节点
当前提交
ab78ab29bf
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      vector/v.edit/main.c

+ 5 - 2
vector/v.edit/main.c

@@ -112,9 +112,12 @@ int main(int argc, char *argv[])
 		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");