Home
Categories
Dictionary
Download
Project Details
Changes Log
FAQ
License

Aborting a script



It is possible to abort the script:
  • In the Script itself
  • In external code using the scripting framework

Aborting in the script itself

The two following methods in the ScriptContext will abort the script execution:
  • The ScriptContext.abort(String) method aborts the current script. The Scripting engine will use the throwable exception to stop the execution
  • The ScriptContext.abort() method aborts the current script without a message. The Scripting engine will use the throwable exception to stop the execution, but no message will appear on the console

The abort method will abort the script execution. It can be listened by an Exception listener.

Aborting outside of the script

It is also possible to abort the script execution in external code using the scripting framework, by using one f the two following methods:

See also


Categories: api

Copyright 2019-2020 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence