|
|
@ -63,6 +63,18 @@ except: |
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
#Catch Exceptions even if PyQt crashes. |
|
|
|
import sys |
|
|
|
sys._excepthook = sys.excepthook |
|
|
|
def exception_hook(exctype, value, traceback): |
|
|
|
"""This hook purely exists to call sys.exit(1) even on a Qt crash |
|
|
|
so that atexit gets triggered""" |
|
|
|
#print(exctype, value, traceback) |
|
|
|
logger.error("Caught crash in execpthook. Trying too execute atexit anyway") |
|
|
|
sys._excepthook(exctype, value, traceback) |
|
|
|
sys.exit(1) |
|
|
|
sys.excepthook = exception_hook |
|
|
|
|
|
|
|
|
|
|
|
scene = QtWidgets.QGraphicsScene() |
|
|
|
|
|
|
|