Getting a property
This is a special case because the CompletionCode and ReasonCode are not always updated:
- If a property get succeeds, the object and MQSession object ReasonCode and CompletionCode remain unchanged.
- If a property get fails with a CompletionCode of warning, the ReasonCode and CompletionCode remain unchanged.
- If a property get fails with a CompletionCode of error, the ReasonCode and CompletionCode are updated to reflect the true values, and error processing proceeds as described.
The MQSession class has a method ReasonCodeName which may be used to replace a WebSphere MQ reason code with a symbolic name. This is especially useful while developing programs where unexpected errors may occur. However, the name is not ideal for presentation to end users.
Each class also has a property ReasonName, that returns the symbolic name of the current reason code for that class.