setErrorObject

setErrorObject(obj: Object);

The setErrorObject method of the Exception class saves a reference to the error object in the exception instance. Use this method to report the object in error when a user raises an exception.