Opened 18 years ago

Last modified 17 years ago

#1907 closed defect

More useful msSetError message clobbered by less useful msSetError message — at Initial Version

Reported by: karl-ms@… Owned by: sdlime
Priority: high Milestone:
Component: MapScript Version: 4.10
Severity: normal Keywords:
Cc:

Description

Let's say I'm generating an SVG file.  msImageCreateSVG gets called, but is unable to get the output 
stream open, like for example, the directory path in IMAGEPATH doesn't exist...

msImageCreateSVG does an msSetError for "Failed to open temporary svg file" and returns NULL.

msDrawMap, detecting a NULL image from msPrepareImage, does an msSetError for "Unable to 
initialize image.", clobbering the "Failed to open temporary svg file", which was actually a lot more 
useful in debugging the problem -- there are many paths by which "Unable to initialize image" can be 
generated.

Suggest mapscript stack errors, generating an error traceback if you will, or do something else, like not 
call msSetError the second time or have msSetError not overwrite a prior undelivered error.  In any case, 
it would be great to get the error back that more closely points to the problem.

Change History (0)

Note: See TracTickets for help on using tickets.