Error
This object contains a script error description to notify the calling code of an exceptional runtime condition.When an error is returned from a script evaluation, it is converted to a Java™ exception and thrown from the script evaluator class..
- Availability
- IBM Security Identity Manager 7.0
- Provided by
- com.ibm.itim.script.extensions.EnroleExtension
- Methods
- setMessage()
- Sets the message for the error.
- getMessage()
- Retrieves the error message for the error.
- setErrorCode()
- Sets the error code for the error.
- getErrorCode()
- Retrieves the error code for the error.
- Usage
var sn = subject.getProperty("sn"); if(sn == null || sn.length == 0) { error.setMessage("sn was missing"); return error; } else { return sn[0]; }
- Error.setMessage()
The method sets the message for the error.- Error.getMessage()
The method retrieves the message set for an error.- Error.setErrorCode()
The method sets the error code for the error.- Error.getErrorCode()
The method retrieves the error code set for an error.Parent topic: JavaScript extension reference