浏览代码

Print warning if copying attribute table to new vector map fails (merge from devbr6 https://trac.osgeo.org/grass/changeset/34592)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34593 15284696-431f-4ddb-bdfa-cd5b030d7da7
Maris Nartiss 16 年之前
父节点
当前提交
af88051431

+ 2 - 1
vector/v.build.polylines/main.c

@@ -204,7 +204,8 @@ int main(int argc, char **argv)
 
     /* Copy (all linked) tables if needed */
     if (write_cats != NO_CATS) {
-	Vect_copy_tables(&map, &Out, 0);
+        if (Vect_copy_tables(&map, &Out, 0))
+            G_warning(_("Failed to copy attribute table to output map"));
     }
 
     /* Tidy up */

+ 2 - 1
vector/v.category/main.c

@@ -482,7 +482,8 @@ int main(int argc, char *argv[])
 
     if (option == O_ADD || option == O_DEL || option == O_CHFIELD ||
 	option == O_SUM) {
-	Vect_copy_tables(&In, &Out, 0);
+        if (Vect_copy_tables(&In, &Out, 0))
+            G_warning(_("Failed to copy attribute table to output map"));
 	Vect_build(&Out);
 	Vect_close(&Out);
     }

+ 2 - 1
vector/v.clean/main.c

@@ -271,7 +271,8 @@ int main(int argc, char *argv[])
 
     /* This works for both level 1 and 2 */
     Vect_copy_map_lines(&In, &Out);
-    Vect_copy_tables(&In, &Out, 0);
+    if (Vect_copy_tables(&In, &Out, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
 
     Vect_set_release_support(&In);
     Vect_close(&In);

+ 2 - 1
vector/v.kcv/main.c

@@ -152,7 +152,8 @@ int main(int argc, char *argv[])
     Vect_copy_map_lines(&In, &Out);
 
     /* Copy tables */
-    Vect_copy_tables(&In, &Out, 0);
+    if (Vect_copy_tables(&In, &Out, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
 
     /* Add column */
     db_init_string(&sql);

+ 2 - 1
vector/v.net/main.c

@@ -182,7 +182,8 @@ int main(int argc, char **argv)
 	    Vect_close(&Points);
 	}
 
-	Vect_copy_tables(&In, &Out, 0);
+        if (Vect_copy_tables(&In, &Out, 0))
+            G_warning(_("Failed to copy attribute table to output map"));
 
 	/* support */
 	Vect_build_partial(&Out, GV_BUILD_NONE);

+ 2 - 1
vector/v.proj/main.c

@@ -275,7 +275,8 @@ int main(int argc, char *argv[])
     fprintf(stderr, "\r");
 
     /* Copy tables */
-    Vect_copy_tables(&Map, &Out_Map, 0);
+    if (Vect_copy_tables(&Map, &Out_Map, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
 
     Vect_close(&Map);
 

+ 2 - 1
vector/v.transform/main.c

@@ -336,7 +336,8 @@ int main(int argc, char *argv[])
 			 ztozero, trans_params,
 			 table->answer, columns_name, atoi(field->answer));
 
-    Vect_copy_tables(&Old, &New, 0);
+    if (Vect_copy_tables(&Old, &New, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
     Vect_close(&Old);
     Vect_build(&New);
 

+ 2 - 1
vector/v.type/main.c

@@ -225,7 +225,8 @@ int main(int argc, char *argv[])
 	Vect_write_line(&Out, type, Points, Cats);
     }
 
-    Vect_copy_tables(&In, &Out, 0);
+    if (Vect_copy_tables(&In, &Out, 0))
+        G_warning(_("Failed to copy attribute table to output map"));
     Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&In);