Bug 427 - [Chameleon - Core] Improve mapserver error reporting
: [Chameleon - Core] Improve mapserver error reporting
Status: CLOSED FIXED
: Chameleon
Core
: 1.99
: PC Windows XP
: P2 normal
: 1.99 beta 3
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-05-31 10:46 by
Modified: 2004-10-27 17:37 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-05-31 10:46:22
The error message reported by mapserver may not always contain an error message,
just a code.  Add conversion of the error codes into a nicer error message.
------- Comment #1 From 2004-05-31 10:50:09 -------
done in cvs, changes applied to drawmap.php (php_utils/src/wrapper/) and to
chameleon.php.
------- Comment #2 From 2004-06-22 09:29:49 -------
The bug is difficult to verify, setting to verified unless norm you have some
ideas. 

This is more of an enhancement request than a bug.
------- Comment #3 From 2004-07-05 11:29:30 -------
We need to generate an error that will output this kind of message.  Paul could
u give us an example?
------- Comment #4 From 2004-07-07 11:33:28 -------
um, tricky because you actually have to set it up such that mapserver generates
an error in drawing the map, this came about because of invalid qix files,
perhaps Daniel could suggest a way to cause a shapefile to have an invalid qix
file?  The previous way of displaying this caused the error report widget to
display empty error messages, the new way will cause it to at least list a human
readable form of the error code, in the case of the qix error I think it should
now say MapServer Memory Allocation Error ... which is still not descriptive of
the real problem, but that is a mapserver problem, not a chameleon problem since
we are just reporting what MapServer tells us.
------- Comment #5 From 2004-07-07 14:43:08 -------
This bug can be closed, by filing a bug on Mapserver-Bugzilla.

What do you think Norm?
------- Comment #6 From 2004-07-07 15:01:10 -------
Chris I don't think so because we want to verify what Chameleon is going to do
when this kind of message pops up.  That is why we need some way of generating a
MS error.

But we should open a MS bug for message unclear.
------- Comment #7 From 2004-07-07 15:03:56 -------
The initial problem was not a MapServer bug, it's the way it works: MapServer
errors are composed of a code and an optional message. The error codes map to a
set of generic messages defined in maperror.c. 

What client code such as chameleon needs to do is display the generic message
corresponding to the error code, optionally followed by the more descriptive
message if present.

Now that I think about it, it is not be possible to fetch the generic error
message for a given error code. This should probbaly be added as a method of the
errorObj.  How did you fix this bug in Chameleon Paul?
------- Comment #8 From 2004-07-14 15:11:33 -------
Norm what should be do with this bug? should we close it?
------- Comment #9 From 2004-07-15 08:41:02 -------
No Chris, I thing we should wait for Paul's answer.
------- Comment #10 From 2004-07-15 09:07:22 -------
yes I was able to draw rectangles, but they would disappear once I completed the
draw. Is this the case on Linux, or does the polygon you drew post session
expiring stays on the map?

If yes to the polygon not being saved on the map. Then I think this is ok, for
this bug since the issue was that when the session expired you got a broken
image map when trying to use the ROI tool. Where the solution was to have the
"session expired" label at the top left of the map explains clearly to the user
what has happened.

If you think the user should not even be able to draw a rectangle post draw than
maybe this should be a new bug to be discussed and/or fixed for beta 3.??
------- Comment #11 From 2004-07-15 09:08:06 -------
sorry ignore last comment, wrong bug.
------- Comment #12 From 2004-07-15 20:34:39 -------
Daniel, I took the list from one of the ms header files, the codes are converted
to text strings based on error numbers using a big if or switch.  Ideally there
would be a mapserver function to get the human readable version of an error
number.  Then I would remove all this code from Chameleon and replace it with a
call to mapscript :>
------- Comment #13 From 2004-10-25 08:41:36 -------
Darren, I found an old beta 2 bug that needs to be set to closed for beta 3.

Paul, what is the best way to verify this bug? or rather how was this verified?
------- Comment #14 From 2004-10-25 09:10:44 -------
the original problem was mapserver reporting a memory allocation error, which
didn't have an associated description so nothing got printed in the error
widget's popup box.  I would imagine that you could create a .qix file (empty
text file) associated with one of your shape files and mapserver would choke on
it, producing this error (which it is supposed to) and then you would see an
appropriate error message in the error widget (instead of no error message). 
Note that I don't know why the error happens (.qix is just one cause of it) so
you won't get much help from the error message, but there will be some text
instead of a dot with nothing next to it.
------- Comment #15 From 2004-10-25 14:10:24 -------
I was unable to get a chameleon error in the errorreport widget, because I
recieved a php.exe error onload from creating a blank /samples/data/roads.qix file.

http://localhost/chameleon/samples/sample_enhanced.phtml

If I placed text in the qix file, there is no error generated and the roads
layer does not show up.
------- Comment #16 From 2004-10-25 15:44:39 -------
I made the same test on Linux without success.  I also built a ".qix" file with
"shptree".  I then corrupted it.  Same thing no error came out.
------- Comment #17 From 2004-10-25 15:53:25 -------
I don't think this deserves to be reopened because you cannot generate an error
to reproduce it.  The problem is fixed and was verified with the IOOS
application (before Dean deleted the invalid qix files).  In normal processing,
this error should never come up anyway, so it seems pointless to keep it open.

I'm closing this bug although if you are desperate to try to reproduce the
original conditions, perhaps you could try an older version of mapserver
.
------- Comment #18 From 2004-10-25 16:24:31 -------
I am content with your comment paul. :) setting to verified. Norm?
------- Comment #19 From 2004-10-27 17:37:03 -------
Satisfied with Paul's comment.