Each function takes a pointer to an MQeExceptBlock object. All functions return an MQERETURN value. This value is used to indicate the general success or failure of a function. In addition each exception event generates a Reason Code which provides further information.
When using C code there are no exception handling mechanisms as in C++.
The structure of the exception block is:
struct MQeExceptBlockExtern_st { MQERETURN ec; MQEREASON erc; MQEINT32 dataArrayEntriedUsed; union { MQEINT32 index; MQEINT32 indexArr[MQE_EXCEPT_DATA_ARRAY_SIZE] } data; }
The dataArrayEnties indicates the number of entries used in the data union. This is used in one of the following ways.
Full details of the return codes and reason codes are provided in the WebSphere MQ Everyplace Application Programming Guide under the MQe_ReturnCodes.h header file. Please see the example code for examples of how the Exception Block is used.