Re: Intercepting DBD:ODBC errors

Garry Williams <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Organization Zvolve Systems, Inc.
Message-ID <1113241066.19830.12.camel@tfr>
On Mon, 2005-04-11 at 18:00 +0100, zzapper wrote:
> On Mon, 11 Apr 2005 12:45:51 -0400,  wrote:
> >On Mon, 2005-04-11 at 16:57 +0100, zzapper wrote:

[snip]

> >    By default, "DBI->connect" sets "PrintError" "on".

> Whoops I also had it specifically switched on, but what's the best
> policy have it on for testing OR leave it off and always test at the
> Perl level?

I don't know.

I usually specify RaiseError => 1, PrintError => 0.  I also wrap queries
that I expect can fail in eval { ... }, if I want to process the
failure.  Otherwise, the default behavior is fine.  (The exception is
not caught and results in a message on stderr and non-zero exit() code.)

-- 
Garry Williams, +1 678 565-4579


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.