Re: Exception handling with Exception::Class::DBI
[prev]
[thread]
[next]
[Date index for 2005/06/29]
On Tue, Jun 28, 2005 at 05:12:19PM -0700, C.J.Collier wrote:
> Hey all,
>
> Is there any way to get a Class::DBI connection to pass
> Exception::Class::DBI ->handler as DBI->Connect()'s HandleError
> argument?
>
> I'm sure the answer is simple, I just haven't found it looking through
> the docs today.
>
> I tried this in vain hopes that it would work. It didn't :)
>
> MailDB::DBI->connection('dbi:mysql:maildb', 'foo', 'bar',
> { PrintError => 0,
> RaiseError => 0,
> HandleError => Exception::Class::DBI->handler
> });
What about
HandleError => sub { Exception::Class::DBI->handler(@_); }
? Not something I'm familiar with but you probably want something along
those lines ...
--
Matt S Trout Website: http://www.shadowcatsystems.co.uk
Technical Director E-mail: mst (at) shadowcatsystems.co.uk
Shadowcat Systems Ltd.
 |
 |
Re: Exception handling with Exception::Class::DBI
Matt S Trout 14:24 on 29 Jun 2005
|