From 55975a49869882887d29333d083e3787cf3adc33 Mon Sep 17 00:00:00 2001 From: pjenvey Date: Fri, 11 Aug 2006 03:58:25 +0000 Subject: assert send_http_response was triggered by an HTTPException, incase it's being used incorrectly --- paste/httpexceptions.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'paste/httpexceptions.py') diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py index 110df96..095fc9f 100644 --- a/paste/httpexceptions.py +++ b/paste/httpexceptions.py @@ -625,6 +625,8 @@ class HTTPExceptionHandler: def send_http_response(self, environ, start_response, exc_info): try: exc = exc_info[1] + assert(isinstance(exc, HTTPException)), \ + 'send_http_response triggered via a non HTTPException' return exc.wsgi_application(environ, start_response, exc_info) finally: exc_info = None -- cgit v1.2.1