Cleaned up error tests and removed testmode from error handler

This commit is contained in:
Veronica K. B. Olsen
2020-12-06 13:01:49 +01:00
parent 730b572d4f
commit 33c2dda471
2 changed files with 40 additions and 29 deletions
+2 -5
View File
@@ -135,7 +135,7 @@ class NWErrorMessage(QDialog):
# END Class NWErrorMessage
def exceptionHandler(exType, exValue, exTrace, testMode=False):
def exceptionHandler(exType, exValue, exTrace):
"""Function to catch unhandled global exceptions.
"""
import nw
@@ -173,10 +173,7 @@ def exceptionHandler(exType, exValue, exTrace, testMode=False):
logger.critical("Could not close the project before exiting")
logger.critical(str(e))
if testMode:
return errMsg.msgBody.toPlainText()
else:
qApp.exit(1)
qApp.exit(1)
except Exception as e:
logger.critical(str(e))