Skip to content

Commit 7f83445

Browse files
committed
[OMCSessionZMQ.sendExpression] check for basic errors ('Error occurred building AST')
1 parent 7620bcc commit 7f83445

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

588588
result = self.omc_zmq.recv_string()
589589

590+
if result.startswith('Error occurred building AST'):
591+
raise OMCSessionException(f"OMC error: {result}")
592+
590593
if command == "getErrorString()":
591594
# no error handling if 'getErrorString()' is called
592595
if parsed:

0 commit comments

Comments
 (0)