[GRASS-SVN] r38682 - grass/branches/develbranch_6/vector/v.extract

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 11 07:45:26 EDT 2009


Author: neteler
Date: 2009-08-11 07:45:26 -0400 (Tue, 11 Aug 2009)
New Revision: 38682

Modified:
   grass/branches/develbranch_6/vector/v.extract/main.c
Log:
stop on DB select error

Modified: grass/branches/develbranch_6/vector/v.extract/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.extract/main.c	2009-08-11 11:45:22 UTC (rev 38681)
+++ grass/branches/develbranch_6/vector/v.extract/main.c	2009-08-11 11:45:26 UTC (rev 38682)
@@ -291,9 +291,10 @@
 	    G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
 			  Fi->database, Fi->driver);
 
-	ncats =
-	    db_select_int(driver, Fi->table, Fi->key, whereopt->answer,
+	ncats =db_select_int(driver, Fi->table, Fi->key, whereopt->answer,
 			  &cats);
+	if (ncats == -1)
+		G_fatal_error(_("Unable select records from table <%s>"), Fi->table);
 	G_message(_("%d categories loaded from table <%s>"), ncats,
 		  Fi->table);
 



More information about the grass-commit mailing list