#3302 closed defect (fixed)
Improve error message when query file extension test fails
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | normal | Milestone: | 5.6.4 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | sdlime |
Description (last modified by )
A user reported on the -users list that he gets the following error when he tries to load a query file in MapScript:
Error in msEvalRegex(): String failed expression test.
The error doesn't help much in figuring the source of the problem. A new msSetError() with a more explicit message should be added in msLoadQuery() when msEvalRegex() fails, something like "Query file extension check failed (extension must be .qy)"
Change History (11)
comment:1 by , 14 years ago
Description: | modified (diff) |
---|
comment:2 by , 14 years ago
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Reopening. You modified the wrong test Tom and <wrist_slap>obviously didn't reproduce the problem and test the fix</wrist_slap>
comment:6 by , 14 years ago
Milestone: | 5.6.2 release → 5.6.4 release |
---|---|
Owner: | changed from | to
Status: | reopened → new |
Taking care of this now.
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 by , 14 years ago
Daniel, do you know if this query extension requirement is documented somewhere? I'm just making sure...
comment:9 by , 14 years ago
Good catch Jeff. A note should probably be added to the saveQuery() method docs in http://mapserver.org/mapscript/php/index.html (PHP) and http://mapserver.org/mapscript/mapscript.html (SWIG).
With respect to the CGI, I believe the temporary queryfile's filename+ext are generated automatically by the SAVEQUERY option, and returned via the [queryfile] template tag so there is no need to add a note there. I will let Steve confirm.
comment:11 by , 14 years ago
small world: I was just testing this with the MapServer Tutorial, and Steve is right, CGI generates the .qy file automatically (http://demo.mapserver.org/cgi-bin/mapserv?map=/osgeo/mapserver/tutorial/htdocs/example3.map&queryfile=/osgeo/mapserver/fgs/tmp/ms_tmp/EX3_128585043117195.qy&layers=states+cities&mode=map&size=200+150)
Good point. Just need to add a custom error message at or near L224 in mapquery.c in msLoadQuery(). -Steve