On Wed, Feb 06, 2002 at 12:47:43PM +0100, Henrik Tougaard wrote:
> > > To sum it up: we do need a way of catching DBI errors and turning
> > > them into something else.
> [snip]
> > 
> > And now you have it...
> > 
> > > Something with a better interface would be nice. It would probably
> > > need to differ between $dbh errors and $sth erros (and $drh errors
> > > of course) as you often need to do things another way if you are
> > > in the middle of a select than if you are trying to update.
> > 
> > How does this sound:
> > 
> >     =item C<HandleError> (code ref, inherited) I<NEW>
> >....[snip]      
> > 
> > Hopefully that'll enable what you want (and more :)
> 
> Beautiful!

Thanks :)

> I hope that the two error handler can coexist for a
> period of time - I would like to have some time to change
> (and not change too much at once!)

I was really hoping to delete Handlers in this release
(it'll simplify and speed up some internals).

It should be trivial to add code like

        eval { $dbh->{HandleError} = $your_handler }
        if ($@) {
                ...setup old 'Handlers' code...
        }

Tim.

Reply via email to