Skip to content

Commit 32b551d

Browse files
committed
[ModelicaSystem.sendExpression] include (original) error message
'from ex' links the original exception but this is not always shown see also OpenModelica#328
1 parent 5095494 commit 32b551d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OMPython/ModelicaSystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def sendExpression(self, expr: str, parsed: bool = True) -> Any:
553553
try:
554554
retval = self._getconn.sendExpression(expr, parsed)
555555
except OMCSessionException as ex:
556-
raise ModelicaSystemError(f"Error executing {repr(expr)}") from ex
556+
raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex
557557

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

0 commit comments

Comments
 (0)