[GRASS-SVN] r38683 -
grass/branches/releasebranch_6_4/vector/v.extract
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 11 07:45:31 EDT 2009
Author: neteler
Date: 2009-08-11 07:45:31 -0400 (Tue, 11 Aug 2009)
New Revision: 38683
Modified:
grass/branches/releasebranch_6_4/vector/v.extract/main.c
Log:
stop on DB select error
Modified: grass/branches/releasebranch_6_4/vector/v.extract/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.extract/main.c 2009-08-11 11:45:26 UTC (rev 38682)
+++ grass/branches/releasebranch_6_4/vector/v.extract/main.c 2009-08-11 11:45:31 UTC (rev 38683)
@@ -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