From e31764f5ac73892ab8b8bc5df406c1213ffe2f4f Mon Sep 17 00:00:00 2001 From: syntron Date: Fri, 31 Oct 2025 15:59:20 +0100 Subject: [PATCH] [OMCSessionZMQ.sendExpression] check for basic errors ('Error occurred building AST') --- OMPython/OMCSession.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OMPython/OMCSession.py b/OMPython/OMCSession.py index 4b65f82a..f623f976 100644 --- a/OMPython/OMCSession.py +++ b/OMPython/OMCSession.py @@ -702,6 +702,9 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any: result = self.omc_zmq.recv_string() + if result.startswith('Error occurred building AST'): + raise OMCSessionException(f"OMC error: {result}") + if command == "getErrorString()": # no error handling if 'getErrorString()' is called if parsed: