[mapserver-commits] r7689 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Jun 18 09:35:26 EDT 2008


Author: Assefa
Date: 2008-06-18 09:35:26 -0400 (Wed, 18 Jun 2008)
New Revision: 7689

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapwfs.c
Log:
Generate error message when applying filter encoding #2444

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-06-17 20:35:33 UTC (rev 7688)
+++ trunk/mapserver/HISTORY.TXT	2008-06-18 13:35:26 UTC (rev 7689)
@@ -13,6 +13,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+-  mapwfs.c: Genrate possibly an error message when applying filter encoding (#2444)
+
 - Added MS_LABEL_BINDING constants for SWIG MapScript (#2643)
 
 - mapogcsos.c: fix POST support (#2379)

Modified: trunk/mapserver/mapwfs.c
===================================================================
--- trunk/mapserver/mapwfs.c	2008-06-17 20:35:33 UTC (rev 7688)
+++ trunk/mapserver/mapwfs.c	2008-06-18 13:35:26 UTC (rev 7689)
@@ -1224,6 +1224,7 @@
       FilterEncodingNode *psNode = NULL;
       int iLayerIndex =1;
       char **paszFilter = NULL;
+      errorObj   *ms_error;
       
       /* -------------------------------------------------------------------- */
       /*      Validate the parameters. When a FILTER parameter is given,      */
@@ -1311,7 +1312,16 @@
 
         /* run filter.  If no results are found, do not throw exception */
         /* this is a null result */
-	FLTApplyFilterToLayer(psNode, map, iLayerIndex, MS_FALSE);
+        if( FLTApplyFilterToLayer(psNode, map, iLayerIndex, MS_FALSE) != MS_SUCCESS ) 
+        {
+            ms_error = msGetErrorObj();
+	
+            if(ms_error->code != MS_NOTFOUND)
+            {
+                msSetError(MS_WFSERR, "FLTApplyFilterToLayer() failed", "msWFSGetFeature()", pszFilter);
+                return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);
+            }
+        }
 
         FLTFreeFilterEncodingNode( psNode );
         psNode = NULL;



More information about the mapserver-commits mailing list