Skip to content

Commit 8fa7c81

Browse files
authored
[OMCSessionZMQ.sendExpression] check for basic errors ('Error occurred building AST') (#363)
1 parent b39bdf5 commit 8fa7c81

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

OMPython/OMCSession.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
702702

703703
result = self.omc_zmq.recv_string()
704704

705+
if result.startswith('Error occurred building AST'):
706+
raise OMCSessionException(f"OMC error: {result}")
707+
705708
if command == "getErrorString()":
706709
# no error handling if 'getErrorString()' is called
707710
if parsed:

0 commit comments

Comments
 (0)