On Wed, Oct 14, 2009 at 9:36 AM, Jonathan Vanasco <[email protected]> wrote: > > Thanks! That's exactly it! > > Where did you learn this? > > I couldn't figure out what the error was. A trace showed HTTPFound, > but that didn't seem right. It catches, but HTTPRedirect catches the > same thing and seems more correct.
HTTPFound (302) is a subclass of HTTPRedirect (300-399), which in turn is a subclass of HTTPException (100-599). So the "proper" thing to do is to catch and re-raise HTTPException. This is not very intuitive or documented. I never encountered it because I call redirect() and abort() only in the actions themselves. I can't think of any way to improve it without changing the paradigm, and exceptions are uniquely suited to this task of jumping back through the call stack to some unknown handler. So I guess we'll just have to put a note in the manual. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
