Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #208 (defect)

Opened 4 years ago

Last modified 3 years ago

Filter exception handling

Status: closed (fixed)

Reported by: peterhunt Assigned to: rdelon
Priority: normal Milestone:
Component: CherryPy code Keywords:
Cc:
  1. You can't raise HTTPRedirect from beforeErrorResponse
  2. Filter lists should be completely iterated through, even if one filter in the chain raises an exception
  3. Original exceptions should be re-raised between each filter so that there is a proper exc_info() for each one.

I can do this patch.

Change History

06/30/05 10:50:59: Modified by lawouach

I'd rather have either a specific filter to handle exceptions, or maybe a new function to basefilter called "onException"

Returning true to stop the process chain, or false to let CP continue with the request as if nothing happened

07/02/05 10:15:13: Modified by fumanchu

> You can't raise HTTPRedirect from beforeErrorResponse

That would be a good thing to fix, in order to enable generic error redirects.

However, I disagree with point 2. Filter authors should instead have their beforeErrorResponse method do any cleanup from an aborted request. The only exception to that rule is onEndResource, which should fire regardless. That stance also makes #3 moot, I think.

09/11/05 01:08:58: Modified by fumanchu

  • status changed from new to closed.
  • resolution set to fixed.
  • description changed.

Point 1 fixed in [624]. Points 2 and 3 won't be implemented.

Hosted by WebFaction

Log in as guest/cpguest to create tickets