diff options
author | brenda-br | 2023-01-03 12:44:21 -0800 |
---|---|---|
committer | brenda-br | 2023-01-03 15:55:58 -0800 |
commit | 32cc0dab87da7d77fed7c67d9adfabe3274bfd4e (patch) | |
tree | 4e8569f6f25dbc52c8fbb41174f88c785ffd8f28 /Container.py | |
parent | 6640cdfac4c954a19a2e01988b34e7777bd9e39f (diff) | |
download | Chemical-Simulator-GUI-32cc0dab87da7d77fed7c67d9adfabe3274bfd4e.tar.gz Chemical-Simulator-GUI-32cc0dab87da7d77fed7c67d9adfabe3274bfd4e.tar.bz2 Chemical-Simulator-GUI-32cc0dab87da7d77fed7c67d9adfabe3274bfd4e.zip |
Fix#28 => Proper Error Message when Simulation Fails
Diffstat (limited to 'Container.py')
-rw-r--r-- | Container.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Container.py b/Container.py index ded17da..28e2ba8 100644 --- a/Container.py +++ b/Container.py @@ -145,12 +145,16 @@ class Container(): elif mode=='EQN': self.msg.append("<span>["+str(self.current_time())+"] Simulating in <b>equation</b> mode ... </span>") self.flowsheet.simulate_EQN() - self.msg_browser() self.result=self.flowsheet.result_data - print("under Eqn mode simulation") - - DockWidget.show_result(NodeItem.get_dock_widget()) + if(len(self.result)== 4): + self.msg_browser() + else: + self.msg.append("<span style=\"color:red\">["+str(self.current_time())+"] Simulation <b>Failed</b></span>") + #print("under Eqn mode simulation") + + if(len(self.result)== 4): + DockWidget.show_result(NodeItem.get_dock_widget()) # for i in self.graphics.scene.items(): # if (isinstance(i, NodeItem)): |