[GRASS-SVN] r38681 - grass/trunk/vector/v.extract
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 11 07:45:23 EDT 2009
Author: neteler
Date: 2009-08-11 07:45:22 -0400 (Tue, 11 Aug 2009)
New Revision: 38681
Modified:
grass/trunk/vector/v.extract/main.c
Log:
stop on DB select error
Modified: grass/trunk/vector/v.extract/main.c
===================================================================
--- grass/trunk/vector/v.extract/main.c 2009-08-11 11:21:01 UTC (rev 38680)
+++ grass/trunk/vector/v.extract/main.c 2009-08-11 11:45:22 UTC (rev 38681)
@@ -287,9 +287,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