[main] Add error widget for 'all' errors

One exception: Wrong arguments aren't handled, because argparse doesn't
throw in this circumstance.
This commit is contained in:
Tobias Witek 2020-02-16 13:50:15 +01:00
parent 0bae9e33bb
commit f05098a120

View file

@ -63,6 +63,13 @@ def main():
output.draw('stop') output.draw('stop')
if __name__ == "__main__": 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 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4