Allow ignoring errors that happen the gui
This commit is contained in:
parent
c99f3fa083
commit
51db3e1249
@ -24,9 +24,12 @@ try:
|
||||
"""
|
||||
if QtWidgets.QApplication.instance() is not None:
|
||||
errorbox = QtWidgets.QMessageBox()
|
||||
errorbox.setStandardButtons(QtWidgets.QMessageBox.StandardButton.Abort|QtWidgets.QMessageBox.StandardButton.Ignore)
|
||||
errorbox.setText(log_msg)
|
||||
errorbox.exec()
|
||||
QtWidgets.QApplication.exit(1)
|
||||
if errorbox.exec() == QtWidgets.QMessageBox.StandardButton.Abort:
|
||||
QtWidgets.QApplication.exit(1)
|
||||
else:
|
||||
logger.warning("Exception ignored")
|
||||
else:
|
||||
logger.debug("No QApplication instance available.")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user