Block the error handler dialog in test mode
This commit is contained in:
+6
-1
@@ -77,13 +77,16 @@ def exceptionHandler(exType, exValue, exTrace):
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from traceback import print_tb, format_tb
|
from traceback import print_tb, format_tb
|
||||||
from nw import __issuesurl__
|
from nw import CONFIG
|
||||||
from PyQt5.QtWidgets import qApp, QApplication, QErrorMessage, QMessageBox
|
from PyQt5.QtWidgets import qApp, QApplication, QErrorMessage, QMessageBox
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.error("%s: %s" % (exType.__name__, str(exValue)))
|
logger.error("%s: %s" % (exType.__name__, str(exValue)))
|
||||||
print_tb(exTrace)
|
print_tb(exTrace)
|
||||||
|
|
||||||
|
if not CONFIG.showGUI:
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
nwGUI = None
|
nwGUI = None
|
||||||
for qWin in qApp.topLevelWidgets():
|
for qWin in qApp.topLevelWidgets():
|
||||||
@@ -104,3 +107,5 @@ def exceptionHandler(exType, exValue, exTrace):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
|
|
||||||
|
return
|
||||||
|
|||||||
@@ -432,7 +432,6 @@ class GuiBuildNovel(QDialog):
|
|||||||
def _buildPreview(self):
|
def _buildPreview(self):
|
||||||
"""Build a preview of the project in the document viewer.
|
"""Build a preview of the project in the document viewer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Get Settings
|
# Get Settings
|
||||||
fmtTitle = self.fmtTitle.text().strip()
|
fmtTitle = self.fmtTitle.text().strip()
|
||||||
fmtChapter = self.fmtChapter.text().strip()
|
fmtChapter = self.fmtChapter.text().strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user