1arm_get_error_message(3)   ARM 4 Programmer's Manual  arm_get_error_message(3)
2
3
4

NAME

6       arm_get_error_message - get error message
7

SYNOPSIS

9       #include <arm4.h>
10
11       arm_error_t
12       arm_get_error_message(
13           const arm_charset_t charset,
14           const arm_error_t code,
15           arm_message_buffer_t msg);
16

DESCRIPTION

18       arm_get_error_message() stores a string containing an error message for
19       the specified error code.
20
21       ARM implementations return values that are specific to the  implementa‐
22       tion.  The only enforced convention is that a return code of zero indi‐
23       cates  that  no  errors  are  reported  (though  an  error  could  have
24       occurred),  and  a  negative  return  code  indicates  that  some error
25       occurred. Some implementations  may  report  an  error  at  times  when
26       another implementation would not.
27
28       To  help  an  application  developer or administrator understand what a
29       negative error code means, arm_get_error_message() can be used to store
30       a  string containing an error message for the specified error code. The
31       ARM library is not obliged to return a message, even if it  returned  a
32       non-zero return code.
33
34       charset   is  an  IANA  (Internet  Assigned  Numbers  Authority  -  see
35       www.iana.org) MIBenum value [see arm_is_charset_supported()]. If a non-
36       null  message  is returned, it will be in this encoding. It is strongly
37       recommended that no value be used for charset that has not been  tested
38       for support by the library using arm_is_charset_supported().
39
40       code is an error code returned as arm_error_t from an API call.
41
42       msg is a pointer to a buffer that can contain 256 characters (including
43       the termination character) into which the null-terminated error message
44       will  be  copied.  The message will be in the encoding specified by the
45       charset parameter. If the implementation cannot honor the request,  the
46       implementation  must  store  at  least  the  null termination character
47       (e.g., which it would do if it does not return a message  or  does  not
48       recognize  the  error code or cannot return the message in the applica‐
49       tion's encoding). The function is ignored if the pointer is null and an
50       error status may be returned.
51

RETURN VALUE

53       On  success,  the  function returns ARM_SUCCESS. A non-zero value indi‐
54       cates an error.
55

ERRORS

57       If the return code is negative, an error occurred. If the  return  code
58       is not negative, an error may or may not have occurred - the determina‐
59       tion of what is an error and whether an error code is  returned  is  at
60       the  discretion of the ARM implementation. The application can test the
61       return code if it wants to provide its own error logging.
62
63       The following errors are recognized by this implementation, but may not
64       be portable to other implementations:
65
66
67       ARM_FAILURE_NULL_ARGUMENT
68              The msg must not be null.
69
70       ARM_FAILURE_UNSUPPORTED_CHARSET
71              The charset requested isn't supported.
72

CONFORMING TO

74       ARM Issue 4.0 C Language Bindings, Version 2
75

EXAMPLE

77       None.
78

SEE ALSO

80       arm_is_charset_supported(3)
81
82
83
84arm4.org                          August 2008         arm_get_error_message(3)
Impressum