[GRASS-SVN] r50460 - grass/branches/develbranch_6/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 26 00:59:28 EST 2012


Author: hamish
Date: 2012-01-25 21:59:28 -0800 (Wed, 25 Jan 2012)
New Revision: 50460

Modified:
   grass/branches/develbranch_6/lib/vector/Vlib/header.c
Log:
add a debug statement and a comment about its error handling (merge from head)

Modified: grass/branches/develbranch_6/lib/vector/Vlib/header.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/header.c	2012-01-26 05:49:52 UTC (rev 50459)
+++ grass/branches/develbranch_6/lib/vector/Vlib/header.c	2012-01-26 05:59:28 UTC (rev 50460)
@@ -505,9 +505,18 @@
     case PROJECTION_LL:
     case PROJECTION_SP:
 	return G__projection_name(n);
+    default:
+	G_debug(1, "Vect_get_proj_name(): "
+		   "Vect_get_proj() returned an invalid result (%d)", n);
+	break;
     }
+
+    /* Vect_get_proj() didn't return a useful result,
+       fallback to G_database_projection_name() */
+    /* (is this behavior desirable?) */
     if (!lookup(PROJECTION_FILE, "name", name, sizeof(name)))
 	strcpy(name, _("Unknown projection"));
+
     return G_store(name);
 }
 



More information about the grass-commit mailing list