From f05098a1204a24ab1db56f8097551148cf5b0a6d Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 16 Feb 2020 13:50:15 +0100 Subject: [PATCH] [main] Add error widget for 'all' errors One exception: Wrong arguments aren't handled, because argparse doesn't throw in this circumstance. --- bumblebee-status | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bumblebee-status b/bumblebee-status index a889d46..9526e62 100755 --- a/bumblebee-status +++ b/bumblebee-status @@ -63,6 +63,13 @@ def main(): output.draw('stop') if __name__ == "__main__": - main() + try: + main() + except Exception as e: + output = core.output.i3() + output.modules(core.module.Error(None, 'main', e)) + output.draw('start') + output.update() + output.draw('statusline') # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4