Skip to content

Commit 1efdcc7

Browse files
committed
[ModelicaSystemDoE] fix exception handling
* self.session().run_model_executable() will raise OMCSessionException!
1 parent 3c316a9 commit 1efdcc7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,9 +2188,9 @@ def worker(worker_id, task_queue):
21882188
try:
21892189
returncode = self.get_session().run_model_executable(cmd_run_data=cmd_definition)
21902190
logger.info(f"[Worker {worker_id}] Simulation {resultpath.name} "
2191-
f"finished with return code: {returncode}")
2192-
except ModelicaSystemError as ex:
2193-
logger.warning(f"Simulation error for {resultpath.name}: {ex}")
2191+
f"finished with return code {returncode}")
2192+
except OMCSessionException as ex:
2193+
logger.warning(f"Error executing {repr(cmd_definition.get_cmd())}: {ex}")
21942194

21952195
# Mark the task as done
21962196
task_queue.task_done()

0 commit comments

Comments
 (0)