Programmer's Guide > Interfaces > CMSObjectEvent interface > errorCode attribute
  
errorCode attribute
Used when the event handler wants to cancel the operation or throw an error exception. This can hold any defined CMSExceptionCode value. To cancel the operation, call preventDefault() and store a value of OPERATION_CANCELED_ERR into errorCode. To cause an error exception, call preventDefault(), store any other defined CMSExceptionCode value into errorCode, and optionally store a message into errorMessage.
errorCode
Access
read-write
Returns
unsigned short