Skip to content

Commit 8ba1e31

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 b39bdf5 commit 8ba1e31

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
@@ -537,7 +537,7 @@ def sendExpression(self, expr: str, parsed: bool = True) -> Any:
537537
try:
538538
retval = self._getconn.sendExpression(expr, parsed)
539539
except OMCSessionException as ex:
540-
raise ModelicaSystemError(f"Error executing {repr(expr)}") from ex
540+
raise ModelicaSystemError(f"Error executing {repr(expr)}: {ex}") from ex
541541

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

0 commit comments

Comments
 (0)