mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -06:00
Handle all uncaught exceptions through CrashHandler and gracefully fail if we have no QCoreApplication
This commit is contained in:
parent
cb06668628
commit
803b4fde8d
2 changed files with 18 additions and 9 deletions
15
cura_app.py
15
cura_app.py
|
@ -3,12 +3,15 @@
|
|||
# Copyright (c) 2015 Ultimaker B.V.
|
||||
# Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
try:
|
||||
import cura.CuraApplication
|
||||
import sys
|
||||
|
||||
app = cura.CuraApplication.CuraApplication.getInstance()
|
||||
app.run()
|
||||
except Exception as e:
|
||||
def exceptHook(type, value, traceback):
|
||||
import cura.CrashHandler
|
||||
cura.CrashHandler.show()
|
||||
cura.CrashHandler.show(type, value, traceback)
|
||||
|
||||
sys.excepthook = exceptHook
|
||||
|
||||
import cura.CuraApplication
|
||||
|
||||
app = cura.CuraApplication.CuraApplication.getInstance()
|
||||
app.run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue