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