Skip to content

Commit 4ede41b

Browse files
committed
[OMCSessionZMQ.sendExpression] check for basic errors ('Error occurred building AST')
1 parent 70cb446 commit 4ede41b

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
@@ -679,6 +679,9 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
679679

680680
result = self.omc_zmq.recv_string()
681681

682+
if result.startswith('Error occurred building AST'):
683+
raise OMCSessionException(f"OMC error: {result}")
684+
682685
if command == "getErrorString()":
683686
# no error handling if 'getErrorString()' is called
684687
if parsed:

0 commit comments

Comments
 (0)