Hi,
I'm using DBI in a cgi-bin script. I can't find a way to suppress the error
message "DB-Library: Login incorrect" if DBI->connect fails. This is an
issue because the raw output causes a web server 500 error.
I've tried setting PrintError, WarnError to false TO no avail. I've also
tried intervention with a signal handler like this:
local $SIG{__DIE__}=sub { errhandler $_[0] };
local $SIG{__WARN_}=sub { errhandler $_[0] };
where errhandler is defined as:
sub errhandler {
my $err=shift;
if($err eq "")
{
$err=$webErr; # this is a global variable I'm using
}
print"Content-type: text/plain\r\n\r\n";
print "<HTML><BODY>ERROR: $err</BODY></HTML>\n";
}
But the signal handler doesn't get called. How do you suppress this message?
TIA,
Pete
Peter Levine
415-286-5716 - 345 California
[EMAIL PROTECTED]