[mapserver-users] ms_error question

Lowell Filak lfilak at medinaco.org
Wed Mar 20 09:08:47 PST 2002


Could you provide additional information?
You say that the error shows up in the error log after the execution of "draw" and that the error code is 1 (MS_FAILURE).
What does $mapscript::ms_error->{message} say after the draw?
Lowell F.

The following message was sent by Giorgio Volpe <giorgio at nauta.it> on Wed, 20 Mar 2002 09:33:12 +0100.

> I need help about error in map server
> I'm writing a script using perl and mapscript.
> 
> I've seen that I can use $mapscript::ms_error object to retrive
> information about errors.
> The question is: should i check this object after execution of every
> mapserver method?
> 
> In particular I've a problem with
> 
>  $img=$map->draw()
> 
> I supposed it was right if defined($img), but in case of error, $img is
> still defined and when i try 
> 
> 	mapscript::msSaveImage($me->img() ...
> 
> i get a "segmentation fault"
> 
> So I supposed it was right if,
> 
> 	 == $mapscript::MS_NOERR
> 
> but after $img=$map->draw(), $mapscript::ms_error->{code} is equal to
> '1' (Unable to access file?) also if image is corectly generated and i
> can save and see it.
> 
> I activate error log file ( set ENV{MS_ERRORFILE} ) and discovered that
> mapscrip writes:
> 
> 	Tue Mar 19 22:45:24 2002 - msSearchDiskTree(): Unable to access file.
> 
> after execution of $img=$map->draw().
> 
> Is there a problem with my map? (same map is ok with demo cgi ...)
> Which is the right way for checking errors?
> 
> thanks!
> 
> -- 
> 
>     Giorgio
> 
> -----------------------------------------




More information about the MapServer-users mailing list