early exit from Nashorn script?

Lipscomb, Gary glipscomb at csu.edu.au
Mon Jan 27 20:16:40 EST 2020


Maybe this 

exit and quit functions[1]

These synonymous functions exit the current process with specified (optional) exit code.
exit
exit(1); // exit with given exit code
exit();  // exit 0
  
quit(2); // exit with given exit code
quit();  // exit 0

[1] https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions

-----Original Message-----
From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor, Scott
Sent: Tuesday, 28 January 2020 12:07
To: Shib Users <users at shibboleth.net>
Subject: Re: early exit from Nashorn script?

On 1/27/20, 7:00 PM, "users on behalf of Jim Fox" <users-bounces at shibboleth.net on behalf of fox at washington.edu> wrote:

> Every Nashorn script I've seen ends with its return value, e.g., 
> "nextFlow;" in mfa scripts.  Is there a way to exit with a value in the 
> middle of the script?

It seems inconceivable, but I'm not aware of any in any of the Javascript engines.

-- Scott


-- 
For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list