Opened 17 years ago

Closed 17 years ago

#1963 closed defect (fixed)

in-image errors mask full error message

Reported by: crschmidt@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.10
Severity: normal Keywords:
Cc:

Description

(No 4.10 is in the version list. Also, I really wanted an "Output-Image" option,
since that is kind of the best place for this.)

The in-image error handling for mapserver only reports one error message. This
means that when an XML serviceException will report text like: 

msDrawMap(): Image handling error. Failed to draw layer named 'image'.
IReadBlock failed at X offset 4, Y offset 14: Unable to access file.
GDALRasterIO() failed: drawGDAL()

The inimage error handler will only display:

msDrawMap(): Image handling error. Failed to draw layer named 'image'.

In order to get my hands on the latter message, I spent an hour in gdb. There
are easier ways to get it, but it wasn't obvious to me that the message was
being returned.

Some options: 
 * In addition to reporting in image, also write out to stderr. This would be
useful in the under-apache case, and was the first place i looked.
 * Include all error messages in the inimage string.

I'll attach a patch which does the latter, and then I'll attach example output. 

This may lower support costs for users who are used to using inimage exceptions:
OpenLayers uses these by default, and being able to get the actual error back
from the service instead of having to change a URL to get it would be useful.

Attachments (2)

mapserver.patch (873 bytes ) - added by crschmidt@… 17 years ago.
Patch to change inimage error string
public.png (1.2 KB ) - added by crschmidt@… 17 years ago.
1000x100px inimage error

Download all attachments as: .zip

Change History (7)

by crschmidt@…, 17 years ago

Attachment: mapserver.patch added

Patch to change inimage error string

by crschmidt@…, 17 years ago

Attachment: public.png added

1000x100px inimage error

comment:1 by crschmidt@…, 17 years ago

Version: 4.84.10
oops. 4.10 is in the list, it just wasn't where I thought it was. Damn
alphabetical ordering.

comment:2 by fwarmerdam, 17 years ago

Cc: warmerdam@… added

comment:3 by sdlime, 17 years ago

Cc: dmorissette@… added
CC'ing Dan too.

Steve

comment:4 by sdlime, 17 years ago

Status: newassigned
I have applied the patch to CVS HEAD so folks, but would really like Dan's
opinion before backporting to 4.10.

Steve

comment:5 by sdlime, 17 years ago

Resolution: fixed
Status: assignedclosed
I'll take silence as acceptance. Applied to 4.10 branch and closing...
Note: See TracTickets for help on using tickets.