On Wed, Jan 26, 2005 at 10:49:17AM +0000, Toby Corkindale wrote:
> On Tue, Jan 25, 2005 at 08:25:04AM -0800, Peter Speltz wrote:
> > --- Toby Corkindale <maypole at wintrmute.net> wrote:
> > > On Mon, Jan 24, 2005 at 01:48:01PM -0500, Dana Hudes wrote:
> > > Thanks Dana,
> > >
> > > I'd thought about using a similar catch-all-fatals system, but I think
> > > Maypole
> > > already tends to catch most exceptions itself - which is probably why we get
> > > a
> > > 404 error instead of a 500 as expected.
> > >
> > > I was thinking it would be nice if we could catch certain errors and then
> > > stick within the Maypole framework for display/handling - eg. a
> > > model-specific error handler routine, call-outs to the 'error' template,
> > > etc.
> > >
> > > I'll keep looking into it; hints welcomed :)
> > >
> >
> > Have you read teh Maypole::Manual::Request error handling section? I follow
> > that model, then when i come to an error just do a "return $r->error("Error.
> > we're dead")" .
>
> I've read it, but it's not really clear how the error () routine it suggests
> is supposed to behave wrt fatal exceptions etc?
>
> I'll experiment some more.
> Thanks for the tip.
(Replying to myself; first sign of madness?)
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?
cheers,
tjc
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT