Re: [Maypole] catching DB errors

From: Toby Corkindale (maypole at wintrmute.net)
Date: Wed Jan 26 2005 - 10:49:17 GMT


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.

-Toby

_______________________________________________
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