I hate to sound rude but 'perldoc DBI' does indeed tell you how to
supress the printing of error messages on STDERR (or is it STDOUT).

You can set the PrintError attribute to false (or zero) as a hash
element in your connect() or, I think, when you prepare your statement.
The only reason I don't know for sure if it can be done in the prepare()
is because I only set the attribute in my connect() calls.

Jeff Holt
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Upcoming events at http://www.hotsos.com/education/schedule.html


-----Original Message-----
From: gohaku [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 27, 2004 19:38
To: [EMAIL PROTECTED]
Subject: Suppressing DBD Error messages


Hi everyone,
I'm sorry if this question has been asked before but
I would like to know of a way to suppress error messages like:
'DBD::mysql::st execute failed: Duplicate entry.... at line 40'

I have tried the following:
     $res = $insert->execute() or die "Not Inserted\n";
and...
$dbh->{RaiseError} = 0;
but those do not work.

Thanks in advance.
-Gohaku

Reply via email to