proper way to report back errors wit mapscript

Joseph Norris sirronj at PACBELL.NET
Thu Dec 16 12:10:09 PST 2004


I have this same script running on another mapserver installation and I have
not got to an error.

The logic says that if (!$map) which means that I did not get an object back
from the call to new mapscript::mapObj - which is an error.

#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of Ethan Alpert
Sent: Thursday, December 16, 2004 12:03 PM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] proper way to report back errors wit
mapscript

Maybe because you're calling $mapscript::ms_error->{message} when
there's no error?

----> if(!map)

-e

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Joseph Norris
Sent: Thursday, December 16, 2004 12:53 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] proper way to report back errors wit
mapscript


Hello again,

I am getting the following errors that I am reporting this way using
perl/mapscript

New mapObj() error: \n
[Thu Dec 16 11:44:11 2004] [error]  New mapObj() error: \n
[Thu Dec 16 11:44:36 2004] [error]  New mapObj() error: \n


I am coding this way:

my $map = new mapscript::mapObj("/tmp/$map_file");
if(!$map){
    die " New mapObj() error: $mapscript::ms_error->{message}\n";
}



I got this ms_error-> deal from another sample script but I don't think
it is reporting what is going on.


#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map
chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,
14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);



More information about the MapServer-users mailing list