[mapserver-commits] r7620 - branches/branch-5-0/mapserver
svn at osgeo.org
svn at osgeo.org
Mon May 26 09:33:18 EDT 2008
Author: dmorissette
Date: 2008-05-26 09:33:18 -0400 (Mon, 26 May 2008)
New Revision: 7620
Modified:
branches/branch-5-0/mapserver/HISTORY.TXT
branches/branch-5-0/mapserver/mapogr.cpp
Log:
Avoid displaying OGR connection strings in error messages (#2629)
Modified: branches/branch-5-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-0/mapserver/HISTORY.TXT 2008-05-26 13:24:41 UTC (rev 7619)
+++ branches/branch-5-0/mapserver/HISTORY.TXT 2008-05-26 13:33:18 UTC (rev 7620)
@@ -13,6 +13,8 @@
Current Version (future 5.0.3, svn branch-5-0)
----------------------------------------------
+- Avoid displaying OGR connection strings in error messages (#2629)
+
- mappostgis.c: fix postgis idle-in-transaction problem (#2626)
- mapogcsld.c: fetch TextSymbolizer/Label/ogc:PropertyName correctly (#2611)
Modified: branches/branch-5-0/mapserver/mapogr.cpp
===================================================================
--- branches/branch-5-0/mapserver/mapogr.cpp 2008-05-26 13:24:41 UTC (rev 7619)
+++ branches/branch-5-0/mapserver/mapogr.cpp 2008-05-26 13:33:18 UTC (rev 7620)
@@ -826,9 +826,9 @@
if( pszDSName == NULL )
{
msSetError(MS_OGRERR,
- "Error parsing OGR connection information:%s",
+ "Error parsing OGR connection information in layer `%s'",
"msOGRFileOpen()",
- (connection?connection:"(null)") );
+ layer->name?layer->name:"(null)" );
return NULL;
}
@@ -874,15 +874,16 @@
{
if( strlen(CPLGetLastErrorMsg()) == 0 )
msSetError(MS_OGRERR,
- "Open failed for OGR connection `%s'. "
+ "Open failed for OGR connection in layer `%s'. "
"File not found or unsupported format.",
"msOGRFileOpen()",
- pszDSSelectedName );
+ layer->name?layer->name:"(null)" );
else
msSetError(MS_OGRERR,
- "Open failed for OGR connection `%s'.\n%s\n",
+ "Open failed for OGR connection in layer `%s'.\n%s\n",
"msOGRFileOpen()",
- pszDSSelectedName, CPLGetLastErrorMsg() );
+ layer->name?layer->name:"(null)",
+ CPLGetLastErrorMsg() );
CPLFree( pszDSName );
CPLFree( pszLayerDef );
return NULL;
@@ -1088,7 +1089,7 @@
msSetError(MS_OGRERR,
"SetAttributeFilter(%s) failed on layer %s.\n%s",
"msOGRFileWhichShapes()",
- layer->filter.string+6, layer->name,
+ layer->filter.string+6, layer->name?layer->name:"(null)",
CPLGetLastErrorMsg() );
RELEASE_OGR_LOCK;
return MS_FAILURE;
@@ -1122,9 +1123,9 @@
(numitems = poDefn->GetFieldCount()) == 0)
{
msSetError(MS_OGRERR,
- "Layer %s,%d contains no fields.",
+ "OGR Connection for layer `%s' contains no fields.",
"msOGRFileGetItems()",
- psInfo->pszFname, psInfo->nLayerIndex );
+ layer->name?layer->name:"(null)" );
return NULL;
}
@@ -1544,11 +1545,10 @@
msSetError(MS_OGRERR,
"%s "
"PROJECTION AUTO cannot be used for this "
- "OGR connection (`%s').",
+ "OGR connection (in layer `%s').",
"msOGRLayerOpen()",
ms_error->message,
- (pszOverrideConnection ? pszOverrideConnection:
- layer->connection) );
+ layer->name?layer->name:"(null)" );
msOGRFileClose( layer, psInfo );
layer->layerinfo = NULL;
return(MS_FAILURE);
More information about the mapserver-commits
mailing list