On 2/10/06, Randall <[EMAIL PROTECTED]> wrote: > When DataController.create finishes, it issues a cherrypy.HTTPRedirect, > which my try block catches and treats like a "bad" Exception. My > personal take on this is that redirecting via Exception is a bad thing > because I can't assume an Exception is something I don't want. I know > I could work around it by checking for particular Exceptions or using a > decorator, but I still think this is a bad thing. It should just be > cherrypy.redirect. Unfortunately, turbogears.redirect raises > cherrypy.HTTPRedirect.
Actually, Sylvain said it best: HTTPRedirect is an Exception and not an Error. (This is like StopIteration). This is well trod upon ground... the positive thing about the use of an Exception here is that it strongly signals that no further processing is going to happen in that method. Also, the code that you've got there definitely shows that DataController needs some more hooks to make life easier on customizers. Kevin

