diff --git a/nw/__init__.py b/nw/__init__.py
index 2271157a..5ffae592 100644
--- a/nw/__init__.py
+++ b/nw/__init__.py
@@ -34,6 +34,7 @@ from os import path, remove, rename
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QErrorMessage
+from nw.error import exceptionHandler
from nw.config import Config
__package__ = "nw"
@@ -249,11 +250,12 @@ def main(sysArgs=None):
if errorData:
errApp = QApplication([])
errMsg = QErrorMessage()
- errMsg.setMinimumWidth(500)
- errMsg.setMinimumHeight(300)
+ errMsg.resize(500, 300)
errMsg.showMessage((
- "ERROR: novelWriter cannot start due to the following issues:
"
- " - %s
Exiting."
+ "
novelWriter cannot start due to the following issues:
" + "
- %s
" + "Shutting down ...
" ) % ( "%s:
%s
Traceback:
%s
Shutting down ...
" - ) % (eInfo[0].__name__, eInfo[1], "Shutting down ...
" + ) % formatHtmlErrMsg(exType, exValue, exTrace)) + errApp.exec_() + + except Exception as e: + logger.critical("Could not create error message dialog.") + logger.critical(str(e)) sys.exit(1) diff --git a/nw/guimain.py b/nw/guimain.py index 6ea48c9b..12655f20 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -56,6 +56,7 @@ class GuiMain(QMainWindow): QMainWindow.__init__(self) logger.debug("Initialising GUI ...") + self.setObjectName("GuiMain") self.mainConf = nw.CONFIG # Some runtime info useful for debugging