arm_get_error_message (3) - Linux Manuals

arm_get_error_message: get error message


arm_get_error_message - get error message


#include <arm4.h>


 const arm_charset_t 

 const arm_error_t 



arm_get_error_message() stores a string containing an error message for the specified error code.

ARM implementations return values that are specific to the implementation. The only enforced convention is that a return code of zero indicates that no errors are reported (though an error could have occurred), and a negative return code indicates that some error occurred. Some implementations may report an error at times when another implementation would not.

To help an application developer or administrator understand what a negative error code means, arm_get_error_message() can be used to store a string containing an error message for the specified error code. The ARM library is not obliged to return a message, even if it returned a non-zero return code.

charset is an IANA (Internet Assigned Numbers Authority - see MIBenum value [see arm_is_charset_supported()]. If a non-null message is returned, it will be in this encoding. It is strongly recommended that no value be used for charset that has not been tested for support by the library using arm_is_charset_supported().
  code is an error code returned as arm_error_t from an API call.
  msg is a pointer to a buffer that can contain 256 characters (including the termination character) into which the null-terminated error message will be copied. The message will be in the encoding specified by the charset parameter. If the implementation cannot honor the request, the implementation must store at least the null termination character (e.g., which it would do if it does not return a message or does not recognize the error code or cannot return the message in the application's encoding). The function is ignored if the pointer is null and an error status may be returned.


On success, the function returns ARM_SUCCESS. A non-zero value indicates an error.


If the return code is negative, an error occurred. If the return code is not negative, an error may or may not have occurred - the determination of what is an error and whether an error code is returned is at the discretion of the ARM implementation. The application can test the return code if it wants to provide its own error logging.

The following errors are recognized by this implementation, but may not be portable to other implementations:

The msg must not be null.
The charset requested isn't supported.


ARM Issue 4.0 C Language Bindings, Version 2