[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Better logging when tracker has an unexpected exception
commit 494a39edce76bf3863290c20419891b7bae80409
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Mon Oct 30 10:08:07 2017 -0700
Better logging when tracker has an unexpected exception
We shouldn't silently swallow errors. Opting for notice runlevel so they're
visible to users by default so they can be reported.
---
nyx/tracker.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nyx/tracker.py b/nyx/tracker.py
index c2c4714..83159f5 100644
--- a/nyx/tracker.py
+++ b/nyx/tracker.py
@@ -396,7 +396,10 @@ class Daemon(threading.Thread):
with self._process_lock:
if self._process_pid is not None:
- is_successful = self._task(self._process_pid, self._process_name)
+ try:
+ is_successful = self._task(self._process_pid, self._process_name)
+ except Exception as exc:
+ stem.util.log.notice('BUG: Unexpected exception from %s: %s' % (type(self).__name__, exc))
else:
is_successful = False
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits