소스 검색

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");