Does channel deploy script need a return? #4929
-
In many examples I see that the channel deploy script ends with a Question 1: If it returns nothing, do I need a (clear: if I want to interrupt/break out of the script somewhere in the middle then I can do it like this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Returning early will short circuit your script, but it won't prevent the channel from deploying. As far as I can tell from looking through the source, mirth does not inspect the return value, so you could probably return anything you wanted. |
Beta Was this translation helpful? Give feedback.
Returning early will short circuit your script, but it won't prevent the channel from deploying.
As far as I can tell from looking through the source, mirth does not inspect the return value, so you could probably return anything you wanted.
return;
is the same asreturn undefined;
, and there is an implicitreturn undefined;
at the end of every javascript function. If you actually want to stop the channel from deploying, throw something.