Server Administration > Automate Tasks and Calculate Data Using Event Triggers > Debugging Configuration Management Client-Side Environment Variables > abortScript() Method
 
abortScript() Method
To stop a trigger from executing when a script error occurs, the abortScript() method is available from the ScriptEnvironmentBean.
This method is usually used in a pre-event trigger to display a message to the user to prevent them from doing something. In addition, it can be used to display error messages when debugging a trigger script, or to display trigger configuration errors.
The abortScript() method takes two parameters:
msg - The abort message.
veto - If true, veto the operation. If false, do not.
abortScript() example: