diff --git a/src/Model/Except.py b/src/Model/Except.py index bd6b41abc2aacb32598544791caaf24709014f39..6687fee30b4cdcb19a7feb6e1fae5fcb5a6e6a0a 100644 --- a/src/Model/Except.py +++ b/src/Model/Except.py @@ -21,7 +21,7 @@ from PyQt5.QtCore import ( ) from PyQt5.QtWidgets import ( - QApplication, QMessageBox, + QApplication, QMessageBox, QLabel, ) _translate = QCoreApplication.translate @@ -34,6 +34,7 @@ _translate = QCoreApplication.translate def exception_message_box(exception): msg = QMessageBox() msg.setIcon(QMessageBox.Critical) + msg.findChild(QLabel, "qt_msgbox_label").setFixedWidth(384) msg.setText("Exception :") msg.setInformativeText(f"{exception}") diff --git a/src/Model/Geometry/Reach.py b/src/Model/Geometry/Reach.py index 04a75c919212d73483e51e75cc045be00238aedf..812ddc51c243d25b6f83eef0a8db00547b7653c4 100644 --- a/src/Model/Geometry/Reach.py +++ b/src/Model/Geometry/Reach.py @@ -572,7 +572,7 @@ class Reach(SQLSubModel): raise FileFormatError( file_path_name, - f"Geometry file extention ({ext}) unkown" + f"Geometry file extention ('.{ext}') unkown" ) @timer diff --git a/src/View/Geometry/UndoCommand.py b/src/View/Geometry/UndoCommand.py index 3f21577d745bbfbf38dadb5ac1d590669c1439ae..f1d181f53086f0b526b49a774ba2d24a055ba0e9 100644 --- a/src/View/Geometry/UndoCommand.py +++ b/src/View/Geometry/UndoCommand.py @@ -19,7 +19,7 @@ import logging from copy import deepcopy -from tools import trace, timer +from tools import trace, timer, logger_exception from PyQt5.QtWidgets import ( QMessageBox, QUndoCommand, QUndoStack, @@ -214,6 +214,7 @@ class ImportCommand(QUndoCommand): self._profiles = self._reach.import_geometry(self._filename) self._profiles.reverse() except Exception as e: + logger_exception(e) exception_message_box(e) else: for profile in self._profiles: