Greetings;
I'm trying to add an error handler (catch statement) to my Groovy script in Xtend M3, but I'm get an error saying it's not allowed. What is the recommended method for error handling?
Thanks;
Billy
Hi @billy-willoughby
Currently we do not allow Exceptions to be caught in the scripts. We are however whitelisting certain exceptions e.g. NumberFormatException. Could you please tell us a bit more on what your scenario is and what you are trying to catch?
Thanks!
At this point, I don't remember the exception. I was trying to capture the exception, and return it in a NOK response to the MI caller. How would the whitelisting work, just setup a handler with a specific error type, or some other method?
Whitelisting is on our side, where we allow certain exceptions to be caught in the code and forbidding the generic catch statements on all exceptions.
So in order to whitelist your exception you should send a request which will be reviewed and we add an exception (pun unintended) for that exception.