From efc0e63020c5d4e6004064cd2f6dac021d4270fb Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 28 Jun 2012 10:31:36 +0400 Subject: [PATCH] catch exceptions in dispatch thread --- processor.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/processor.py b/processor.py index 96fb3c2..5b8ebf2 100644 --- a/processor.py +++ b/processor.py @@ -121,7 +121,11 @@ class RequestDispatcher(threading.Thread): raise TypeError("self.shared not set in Processor") while not self.shared.stopped(): session, request = self.pop_request() - self.do_dispatch(session, request) + try: + self.do_dispatch(session, request) + except: + traceback.print_exc(file=sys.stdout) + self.stop() -- 1.7.1