Re: [Maypole] catching DB errors

From: Dave Howorth (Dave.Howorth at acm.org)
Date: Wed Jan 26 2005 - 19:17:46 GMT


Simon Flack wrote:
> If you want to deal with fatal errors differently, you can define your
> own $r->exception() or add model-specific 'exception' handlers to each
> of your model classes.

I for one had forgotten this. I'll write a paragraph for the request
cookbook so I don't forget again :) (and maybe other places?).

Toby, any code you write for the body of exception() would be a useful
real-life example for the manual if you'd care to post it!

Simon - and anybody else who cares - I have a minor difficulty with the
conceptual abstraction here. The detail level for exception() is the
model subclasses. Why then is the generic level in the driver (i.e. a
different class hierarchy)? Surely the natural home of a general method
that can be overidden on a subclass basis is in the superclass? That is,
the model base class.

The obvious immediate answer is "exception just copies the way
authenticate works". So the immediate riposte is "why does authenticate
not work that way as well?".

Cheers, Dave

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 25/01/05

_______________________________________________ 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