Skip to content

Commit bfe7b02

Browse files
syntronadeas31
andauthored
[ModelicaSystem.sendExpression] include (original) error message (#370)
'from ex' links the original exception but this is not always shown see also #328 Co-authored-by: Adeel Asghar <adeel.asghar@liu.se>
1 parent 83552d8 commit bfe7b02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OMPython/ModelicaSystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def sendExpression(self, expr: str, parsed: bool = True) -> Any:
587587
try:
588588
retval = self._session.sendExpression(expr, parsed)
589589
except OMCSessionException as ex:
590-
raise ModelicaSystemError(f"Error executing {repr(expr)}") from ex
590+
raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex
591591

592592
logger.debug(f"Result of executing {repr(expr)}: {textwrap.shorten(repr(retval), width=100)}")
593593

0 commit comments

Comments
 (0)