[Maypole] catching DB errors

Toby Corkindale maypole@wintrmute.net
Wed, 26 Jan 2005 14:44:11 +0000


On Wed, Jan 26, 2005 at 01:02:05PM +0000, Dave Howorth wrote:
> Toby Corkindale wrote:
> >However, I've tried putting an error subroutine into both the main driver
> >class, and also the model classes too.
> >In neither case was it actually called when the DB threw up an error.
> >
> >Is the error sub supposed to be called in these cases, or am I 
> >misinterpreting
> >what it was designed for?
> 
> It doesn't get called. You have to call it when you think it is 
> appropriate, as described in the manual:

Ah, that's the problem.. I was kind of hoping for something that would be
called when Maypole/Perl/Class::DBI/XML::XSLT throws an exception.

Class::DBI has an overrideable _croak() function; is there an equivelent in
Maypole?

ta,
    Toby