[GRASS-SVN] r57265 - grass/branches/develbranch_6/db/base

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 24 12:57:06 PDT 2013


Author: neteler
Date: 2013-07-24 12:57:06 -0700 (Wed, 24 Jul 2013)
New Revision: 57265

Modified:
   grass/branches/develbranch_6/db/base/describe.c
Log:
db.describe: tell user more when failing, fix #1866 (backport from trunk, r57260)

Modified: grass/branches/develbranch_6/db/base/describe.c
===================================================================
--- grass/branches/develbranch_6/db/base/describe.c	2013-07-24 19:56:47 UTC (rev 57264)
+++ grass/branches/develbranch_6/db/base/describe.c	2013-07-24 19:57:06 UTC (rev 57265)
@@ -47,6 +47,11 @@
     dbString stmt;
 
     parse_command_line(argc, argv);
+    if (!db_table_exists(parms.driver, parms.database, parms.table)) {
+	G_message(_("Table <%s> not found in database <%s> using driver <%s>"),
+		   parms.table, parms.database, parms.driver);
+	exit(EXIT_SUCCESS);
+    }
     driver = db_start_driver(parms.driver);
     if (driver == NULL)
 	G_fatal_error(_("Unable to start driver <%s>"), parms.driver);



More information about the grass-commit mailing list