If an error occurs during any call to the C Statistics API, the function returns with a value of -1, and the variable ba_errno is set to an error code that indicates the error condition. The possible error codes for ba_errno are listed in Table 4-2.
The C Statistics API provides the following functions for error handling:
ba_strerror() returns the error message associated with an error code stored in ba_errno. It is equivalent to strerror(3C).
ba_perror() prints the error code, followed by the error message returned by ba_strerror(), to standard output. It is equivalent to perror(3C).
Solaris Bandwidth Manager does not reset ba_errno following a successful function call. This means that the value of ba_errno is only valid when a function returns -1 to indicate an error condition.