Skip to content

Commit 665e5b5

Browse files
committed
[ModelicaSystemDoE] fix exception handling
* self.session().run_model_executable() will raise OMCSessionException!
1 parent 19c3979 commit 665e5b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

OMPython/ModelicaSystem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,9 +2144,9 @@ def worker(worker_id, task_queue):
21442144
try:
21452145
returncode = self.get_session().run_model_executable(cmd_run_data=cmd_definition)
21462146
logger.info(f"[Worker {worker_id}] Simulation {resultpath.name} "
2147-
f"finished with return code: {returncode}")
2148-
except ModelicaSystemError as ex:
2149-
logger.warning(f"Simulation error for {resultpath.name}: {ex}")
2147+
f"finished with return code {returncode}")
2148+
except OMCSessionException as ex:
2149+
logger.warning(f"Error executing {repr(cmd_definition.get_cmd())}: {ex}")
21502150

21512151
# Mark the task as done
21522152
task_queue.task_done()

0 commit comments

Comments
 (0)