Sun Java System Message Queue 4.3 Developer's Guide for C Clients

MQGetErrorTrace

The MQGetErrorTrace function returns an MQString describing the error trace at the time when a function call failed for the calling thread.

MQString MQGetErrorTrace ()

Having found that a Message Queue function has not returned successfully, you can get an error trace when the error occurred by calling the MQGetErrorTrace function in the same thread that called the unsuccessful Message Queue function.

The MQGetErrorTrace function returns an MQString describing the error trace if it can determine this information. The function will return a NULL string if there is no error trace available.

The following is an example of an error trace output.


connect:../../../../src/share/cclient/io/TCPSocket.cpp:195:mq:-5981
readBrokerPorts:../../../../src/share/cclient/client/PortMapper
                                                Client.cpp:48:mq:-5981
connect:../../../../../src/share/cclient/client/protocol/
                                    TCPProtocolHandler.cpp:111:mq:-5981
connectToBroker:../../../../src/share/cclient/client/Connection.
                                                     cpp:412:mq:-5981
openConnection:../../../../src/share/cclient/client/Connection.
                                                     cpp:227:mq:1900
MQCreateConnectionExt:../../../../src/share/cclient/cshim/
                                        iMQConnectionShim.cpp:102:mq:1900

You must call the MQFreeString() function to free the MQString returned by the MQGetErrorTrace function when you are done.

MQGetFloat32Property

The MQGetFloat32Property function passes back the value of the MQFloat32 property for the specified key.


MQGetFloat32Property(const MQPropertiesHandle propertiesHandle,
                           ConstMQString key,
                           MQFloat32 * value);

Return Value

MQStatus. See the MQStatusIsError() function for more information.

Parameters

propertiesHandle

A properties handle for the key you want to get.

key

The name of a property key.

value

Output parameter for the property value.

Common Errors

MQ_NOT_FOUND
MQ_INVALID_TYPE_CONVERSION