Getting an Error Description
You may use the awErrorToString or awErrorToCompleteString functions to obtain a descriptive message, given a BrokerError. The awErrorToString function returns a brief message while the awErrorToCompleteString function returns a more detailed description. The string that is returned is intended for debugging purposes and you should not free it.
The following example illustrates how to print a brief error description:
BrokerError err;
. . .
err = awNewBrokerClient(broker_host, broker_name,
NULL, client_group, "Publish Sample #1",NULL, &c);
if (err != AW_NO_ERROR) {
printf("Error on create client\n%s\n", awErrorToString(err));
return 0;
}