Skip to content

Commit f7c6eb5

Browse files
committed
Added error message from_osp_config_file.
1 parent f16d518 commit f7c6eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcosimpy/CosimExecution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from typing import Optional
1515

1616
from . import CosimConstants, CosimEnums, CosimManipulator, CosimObserver, CosimSlave
17-
from ._internal import wrap_function, libcosimc
17+
from ._internal import wrap_function, libcosimc, get_last_error_message
1818
from .CosimAlgorithm import CosimAlgorithm
1919

2020
if typing.TYPE_CHECKING:
@@ -272,7 +272,7 @@ def from_osp_config_file(cls, osp_path: str):
272272

273273
execution_ptr = osp_execution_create(encoded_osp_path, False, 0)
274274

275-
assert execution_ptr, "Unable to create execution from path. Please check if path is correct."
275+
assert execution_ptr, f"Unable to create execution from path: {get_last_error_message()}"
276276

277277
return cls(cls.__create_key, execution_ptr)
278278

0 commit comments

Comments
 (0)