[mapserver-users] MapScript WMS Server - Custom exceptions
Frank Warmerdam
warmerdam at pobox.com
Fri Sep 17 06:16:00 PDT 2010
Frost89 wrote:
> Hi all
>
> I have created a C# MapScript wrapper for a WMS server. Now, I want to add
> some "vendor-specific parameters" to the request (e.g.:
> "http://server/wms?request=getmap&...&login=usr&password=pwd")
>
> This I have also made work, to a point. When the user enters invalid
> information, I just return a 403 errorpage (Access denied). I was thinking
> about throwing a WMS exception (XML/InImage/Blank) and wondering if
> MapServer/MapScript is able to throw custom exceptions? Or do I have to
> handle it myself?
>
> /Kristian Frost
Kristian,
Skimming maperror.h it appears that msSetError() is not exposed via SWIG.
I think you would pretty much need access to this to push an error message
through the conventional error handling channels from C#.
One approach would be to try and expose msSetError() though I'm not sure
if that would be enough.
Alternatively you could fake your way around it just creating the error
image or xml yourself. But this might be fragile in various ways.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list