Error code extraction
The function TM1ValErrorCode returns a 32-bit code associated with the error.