CP provides hooks when an error occurs: http://www.cherrypy.org/trunk/docs/book/chunk/ch03.html#id3294067
- Sylvain Selon Jonathan LaCour <[EMAIL PROTECTED]>: > > > Like this? > > > > from cherrypy.lib.filter import basefilter > > from myproject.model import hub > > > > class TxnFilter(basefilter.BaseFilter): > > def onStartResource(self): > > hub.begin() > > > > def onEndResource(self): > > hub.end() > > I should follow this up with the fact that the actual *error* > handling (the rolling back of transactions on exceptions) would still > have to occur in the expose decorator because, as far as I know, > CherryPy doesn't have an `onException` hook in its filter support > (although I think it should). > > -- Jon > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

