I've been writing some library code that catches a MissingMethodException and calls getMethod() to check the name of the method for which the call failed. This was working about a month or so ago, but recently trying to recompile and save my driver code I'm now getting the error:
Expression [MethodCallExpression] is not allowed: e.getMethod()
The block of code causing this error is:
def invoke(methodName, ...args) {
try {
return this."$methodName"(*args)
} catch (MissingMethodException e) {
_modbus_logDebug "invoke() exception caught: ${e}";
if (e.getMethod() == methodName) {
_modbus_logWarn "No ${methodName}() method";
return null;
} else {
throw e;
}
} catch (e) {
throw e;
}
}
This has been blocked as part of some kind of tweak to the sandbox security? Annoying if this is the case. Can anyone confirm?
My hub is currently on platform version 2.5.1.183