Error Handling Beans and Methods
To retrieve error messages generated during server-side command calls, use the ScriptErrorMessageBean. The getMessage() method returns the error message, and the ScriptEnvironmentBean contains a stack of any errors that may have occurred during the execution of server-side commands.
Useful error methods for using inside of a try...catch block include:
• emptyErrorMessageStack() - empties the error message stack.
• getErrorMessage() - the error message of the given index.
• numberOfErrorMessages() - the number of error messages in the error message stack.
• popErrorMessage() - pops an error message of the stack.
• pushErrorMessage() - pushes and error message on the stack.