Skip to content

Commit

Permalink
leg error when uncaught exception occured, quit app on interrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
TheZlodziej committed Sep 17, 2023
1 parent 0454f25 commit f94298f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ def main(args: Namespace):
except KeyboardInterrupt:
break
else:
app = QApplication()
window = MqttSimMainWindow(sim)
window.show()
app.exec()
try:
app = QApplication()
window = MqttSimMainWindow(sim)
window.show()
app.exec()
except KeyboardInterrupt:
app.quit()
except Exception as e:
logger.error(e)
sim.stop()
# end sim setup

Expand Down

0 comments on commit f94298f

Please sign in to comment.