Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Handling Errors | Using BrokerErrors
 
Using BrokerErrors
 
Getting the Error Code
Getting an Error Description
Other Error Functions
Preserving Errors During Recovery Processing
Most of the webMethods Broker library functions are designed to return a BrokerError pointer. The webMethods Broker system has one global error per thread that is considered to be the current error. The system manages the memory associated with the current error. If your application copies the current error, remember that you are responsible for freeing the memory associated with those copies.
The BrokerError contains an indication of the success or failure of the function call. If the function call has returned without an error, NULL will be returned. The following example shows how to test for an error after an webMethods Broker library (awNewBrokerClient) function call:
BrokerError err;
. . .
err = awNewBrokerClient(broker_host, broker_name,
NULL, client_group, "Publish Sample #1",NULL, &c);
if (err != AW_NO_ERROR) {
/* process the error */
. . .