Salome HOME
Copyright update 2020
[modules/smesh.git] / src / Tools / MGCleanerPlug / MGCleanerMonViewText.py
index fb96f3dbb0acc700857c82e91055e37bc0d8f592..c45e4cdf5244f817c2ccabb2a19077e4d69536f8 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2013-2019  EDF R&D
+# Copyright (C) 2013-2020  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -110,8 +110,14 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog):
         if exit_code == 0 and not self.anErrorOccured:
             self.parent().enregistreResultat()
         elif not self.hasBeenCanceled:
-            QMessageBox.critical(self, 'Computation failed',
-                 'The computation has failed.<br>Please, check the log message.')
+            if os.path.exists(self.parent().fichierOut):
+                self.parent().enregistreResultat()
+                QMessageBox.critical(self, 'Computation ended in error',
+                  'A new mesh has been generated but with some errors.'+
+                  '<br>Please, check the log message.')
+            else:
+                QMessageBox.critical(self, 'Computation failed',
+                  'The computation has failed.<br>Please, check the log message.')
         pass
 
     def errorOccured(self):