Kevin Dangoor <[EMAIL PROTECTED]> writes:

> On the one hand, just having @error_handler is pleasant. But, the part
> that's nice about tg_errors is that you don't need to head off and
> inspect cherrypy.request.validation_errors.

And, in fact, I've eliminated some 'import cherrypy' in my code.  I just used
it for redirects (now turbogears.redirect) and error inspection (now doen with
tg_errors). 

> Of course, you can realistically only get 1 exception. Should it be
> tg_exception?

Hmmm...  I prefer plural.  Not because there will be only one exception inside
it, but because it can be any exception.  AND, you can trap not just the
specific exception but any of its parent classes.  I.e., one can trap
'sqlobject.NotFound' or 'Exception'.  One is specific, the other is generic.
So, for one generated exception (NotFound), I can trap two or more, depending
on how I'm working.  (Bad example, but...)

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to