The function ba_perror() prints a message on the standard error output that describes the last error encountered during a call to the C Statistics API. It is equivalent to the system function perror(3C).
The error message is printed using the following format:
msgstr: error_message
where msgstr is a user-supplied character string that gives context to the message, and error_message is the result of a call to ba_strerror(ba_errno). In most cases, msgstr is set to provide information about the function call that caused the error condition.
For example, if ba_errno is set to BA_INVIFACE as the result of a call to ba_get_num_classes(), and msgstr is set as follows:
ba_get_num_classes (le1)
the message produced by a call to ba_perror() would be:
ba_get_num_classes (le1): interface not found