in reply to Catching errors with Class::DBI

I think the answer is "just like any exception".
eval { $entry = Contacts->create( \%hash ); }; if( $@ ) { ... handle the exception from CDBI or passed upwards by ... ... CDBI as mentioned in last two paras under EXCEPTIONS ... }

Replies are listed 'Best First'.
Re: Re: Catching errors with Class::DBI
by princepawn (Parson) on Nov 12, 2003 at 01:03 UTC

    Exceptions can also be handled via the DBI HandleError attribute. Config::DBI's docs shows an example of setting one up.

    Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality