From eee14260f40c75d45297a6b3044ce7675e4f7f0f Mon Sep 17 00:00:00 2001 From: enkore Date: Thu, 28 Aug 2014 16:11:53 +0200 Subject: [PATCH] Alternative exception handling Related #102 #100 and others --- i3pystatus/core/threading.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i3pystatus/core/threading.py b/i3pystatus/core/threading.py index 8c8802c..6063c54 100644 --- a/i3pystatus/core/threading.py +++ b/i3pystatus/core/threading.py @@ -73,6 +73,11 @@ class ExceptionWrapper(Wrapper): )) traceback.print_exc(file=sys.stderr) sys.stderr.flush() + if hasattr(self.workload, "output"): + self.workload.output = { + "full_text": "{}: {}".format(self.workload.__class__.__name__, sys.exc_info()[1]), + "color": "#FF0000", + } class WorkloadWrapper(Wrapper):