Skip to content

Commit 99d35e7

Browse files
committed
[ModelicaSystemDoE] fix exception handling
* self.session().run_model_executable() will raise OMCSessionException!
1 parent d6827fa commit 99d35e7

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
@@ -2145,9 +2145,9 @@ def worker(worker_id, task_queue):
21452145
try:
21462146
returncode = self.session().run_model_executable(cmd_run_data=cmd_definition)
21472147
logger.info(f"[Worker {worker_id}] Simulation {resultpath.name} "
2148-
f"finished with return code: {returncode}")
2149-
except ModelicaSystemError as ex:
2150-
logger.warning(f"Simulation error for {resultpath.name}: {ex}")
2148+
f"finished with return code {returncode}")
2149+
except OMCSessionException as ex:
2150+
logger.warning(f"Error executing {repr(cmd_definition.get_cmd())}: {ex}")
21512151

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

0 commit comments

Comments
 (0)