From: Eric S. Raymond Date: Sat, 6 Oct 2012 09:05:32 +0000 (-0400) Subject: Enable us to see stack traces from with delivery threads when debuglvl > 0. X-Git-Tag: 1.8~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2bbe5a12acf31b8ab34855d19f706eefca6c9ab0;p=irker.git Enable us to see stack traces from with delivery threads when debuglvl > 0. --- diff --git a/irkerd b/irkerd index 34fb33a..59efc7b 100755 --- a/irkerd +++ b/irkerd @@ -254,9 +254,13 @@ class Connection: self.irker.debug(1, "XMIT_TTL bump (%s transmission) at %s" % (self.servername, time.asctime())) self.queue.task_done() except: - (exc_type, _exc_value, _exc_traceback) = sys.exc_info() + (exc_type, _exc_value, exc_traceback) = sys.exc_info() self.irker.logerr("exception %s in thread for %s" % \ (exc_type, self.servername)) + # This is so we can see tracebacks for errors inside the thread + # when we need to be able to for debugging purposes. + if debuglvl > 0: + raise exc_type, exc_value, exc_traceback def live(self): "Should this connection not be scavenged?" return self.status != "expired"