[mapserver-commits] r10605 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Oct 14 14:25:41 EDT 2010
Author: warmerdam
Date: 2010-10-14 11:25:41 -0700 (Thu, 14 Oct 2010)
New Revision: 10605
Modified:
trunk/mapserver/mapwfs.c
Log:
improve error handling (#3570)
Modified: trunk/mapserver/mapwfs.c
===================================================================
--- trunk/mapserver/mapwfs.c 2010-10-14 03:39:54 UTC (rev 10604)
+++ trunk/mapserver/mapwfs.c 2010-10-14 18:25:41 UTC (rev 10605)
@@ -1938,10 +1938,26 @@
}
if (psFormat == NULL)
{
+ msSetError(MS_WFSERR,
+ "'%s' is not a permitted output format for layer '%s', review wfs_formats setting.",
+ "msWFSGetFeature()",
+ paramsObj->pszOutputFormat,
+ lp->name );
return msWFSException(map, "outputformat",
"InvalidParameterValue",
- paramsObj->pszOutputFormat );
+ paramsObj->pszVersion );
}
+
+ if( psFormat->imagemode != MS_IMAGEMODE_FEATURE )
+ {
+ msSetError(MS_WFSERR,
+ "OUTPUTFORMAT '%s' does not have IMAGEMODE FEATURE, and is not permitted for WFS output.",
+ "msWFSGetFeature()",
+ paramsObj->pszOutputFormat );
+ return msWFSException( map, "outputformat",
+ "InvalidParameterValue",
+ paramsObj->pszVersion );
+ }
}
}
@@ -2493,7 +2509,10 @@
map->querymap.status = MS_FALSE;
status = msReturnTemplateQuery( mapserv, psFormat->name, NULL );
-
+ if( status != MS_SUCCESS )
+ return msWFSException(map, "mapserv", "NoApplicableCode",
+ paramsObj->pszVersion );
+
mapserv->request = NULL;
mapserv->map = NULL;
More information about the mapserver-commits
mailing list