ImqError C++ class

This abstract class provides information on errors associated with an object.

Figure 1. ImqError class


Object attributes

    completion code
    The most recent completion code. The initial value is zero. The following additional values are possible:

    • MQCC_OK
    • MQCC_WARNING
    • MQCC_FAILED

    reason code
    The most recent reason code. The initial value is zero.


Constructors

    ImqError( );
    The default constructor.

    ImqError( const ImqError & error );
    The copy constructor.


Object methods (public)

    void operator = ( const ImqError & error );
    Copies instance data from error, replacing the existing instance data.

    void clearErrorCodes ( );
    Sets the completion code and reason code both to zero.

    MQLONG completionCode ( ) const ;
    Returns the completion code.

    MQLONG reasonCode ( ) const ;
    Returns the reason code.


Object methods (protected)

    ImqBoolean checkReadPointer ( const void * pointer, const size_t length );
    Verifies that the combination of pointer and length is valid for read-only access, and returns TRUE if successful.

    ImqBoolean checkWritePointer ( const void * pointer, const size_t length );
    Verifies that the combination of pointer and length is valid for read-write access, and returns TRUE if successful.

    void setCompletionCode ( const MQLONG code = 0 );
    Sets the completion code.

    void setReasonCode ( const MQLONG code = 0 );
    Sets the reason code.


Reason codes

  • MQRC_BUFFER_ERROR

Parent topic: IBM MQ C++ classes