[GRASS-SVN] r52821 - grass/branches/releasebranch_6_4/lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 21 08:16:49 PDT 2012
Author: mmetz
Date: 2012-08-21 08:16:48 -0700 (Tue, 21 Aug 2012)
New Revision: 52821
Modified:
grass/branches/releasebranch_6_4/lib/vector/diglib/cindex_rw.c
grass/branches/releasebranch_6_4/lib/vector/diglib/plus_struct.c
grass/branches/releasebranch_6_4/lib/vector/diglib/spindex_rw.c
Log:
diglib: more understandable messages
Modified: grass/branches/releasebranch_6_4/lib/vector/diglib/cindex_rw.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/diglib/cindex_rw.c 2012-08-21 15:06:16 UTC (rev 52820)
+++ grass/branches/releasebranch_6_4/lib/vector/diglib/cindex_rw.c 2012-08-21 15:16:48 UTC (rev 52821)
@@ -18,6 +18,7 @@
#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
+#include <grass/version.h>
int dig_write_cidx_head(GVFILE * fp, struct Plus_head *plus)
{
@@ -131,10 +132,12 @@
if (plus->cidx_Back_Major > GV_CIDX_VER_MAJOR ||
plus->cidx_Back_Minor > GV_CIDX_VER_MINOR) {
/* This version of GRASS lib is lower than the oldest which can read this format */
+ G_debug(1, "Category index format version %d.%d",
+ plus->cidx_Version_Major, plus->cidx_Version_Minor);
G_fatal_error
- ("Category index format version %d.%d is not supported by this release."
- " Try to rebuild topology or upgrade GRASS.",
- plus->cidx_Version_Major, plus->cidx_Version_Minor);
+ ("This version of GRASS (%d.%d) is too old to read this category index format."
+ " Try to rebuild topology or upgrade GRASS to at least version %d.",
+ GRASS_VERSION_MAJOR, GRASS_VERSION_MINOR, GRASS_VERSION_MAJOR + 1);
return (-1);
}
Modified: grass/branches/releasebranch_6_4/lib/vector/diglib/plus_struct.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/diglib/plus_struct.c 2012-08-21 15:06:16 UTC (rev 52820)
+++ grass/branches/releasebranch_6_4/lib/vector/diglib/plus_struct.c 2012-08-21 15:16:48 UTC (rev 52821)
@@ -18,6 +18,7 @@
#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
+#include <grass/version.h>
/*
* Routines for reading and writing Dig+ structures.
@@ -594,10 +595,12 @@
if (ptr->Back_Major > GV_TOPO_VER_MAJOR ||
ptr->Back_Minor > GV_TOPO_VER_MINOR) {
/* This version of GRASS lib is lower than the oldest which can read this format */
+ G_debug(1, "Topology format version %d.%d",
+ ptr->Version_Major, ptr->Version_Minor);
G_fatal_error
- ("Topology format version %d.%d is not supported by this release."
- " Try to rebuild topology or upgrade GRASS.",
- ptr->Version_Major, ptr->Version_Minor);
+ ("This version of GRASS (%d.%d) is too old to read this topology format."
+ " Try to rebuild topology or upgrade GRASS to at least version %d.",
+ GRASS_VERSION_MAJOR, GRASS_VERSION_MINOR, GRASS_VERSION_MAJOR + 1);
return (-1);
}
Modified: grass/branches/releasebranch_6_4/lib/vector/diglib/spindex_rw.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/diglib/spindex_rw.c 2012-08-21 15:06:16 UTC (rev 52820)
+++ grass/branches/releasebranch_6_4/lib/vector/diglib/spindex_rw.c 2012-08-21 15:16:48 UTC (rev 52821)
@@ -18,6 +18,7 @@
#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
+#include <grass/version.h>
int dig_Wr_spindx_head(GVFILE * fp, struct Plus_head *ptr)
@@ -108,10 +109,12 @@
if (ptr->spidx_Back_Major > GV_SIDX_VER_MAJOR ||
ptr->spidx_Back_Minor > GV_SIDX_VER_MINOR) {
/* This version of GRASS lib is lower than the oldest which can read this format */
+ G_debug(1, "Spatial index format version %d.%d",
+ ptr->spidx_Version_Major, ptr->spidx_Version_Minor);
G_fatal_error
- ("Spatial index format version %d.%d is not supported by this release."
- " Try to rebuild topology or upgrade GRASS.",
- ptr->spidx_Version_Major, ptr->spidx_Version_Minor);
+ ("This version of GRASS (%d.%d) is too old to read this spatial index format."
+ " Try to rebuild topology or upgrade GRASS to at least version %d.",
+ GRASS_VERSION_MAJOR, GRASS_VERSION_MINOR, GRASS_VERSION_MAJOR + 1);
return (-1);
}
More information about the grass-commit
mailing list