Returns an error message string.
Object Data Manager Library (libodm.a)
#include <odmi.h>
int odm_err_msg (ODMErrno, MessageString) long ODMErrno; char **MessageString;
The odm_err_msg subroutine takes as input an ODMErrno parameter and an address in which to put the string pointer of the message string that corresponds to the input ODM error number. If no corresponding message is found for the input error number, a null string is returned and the subroutine is unsuccessful.
ODMErrno | Specifies the error code for which the message string is retrieved. |
MessageString | Specifies the address of a string pointer that will point to the returned error message string. |
Upon successful completion, a value of 0 is returned. If the odm_err_msg subroutine is unsuccessful, a value of -1 is returned, and the MessageString value returned is a null string.
The following example shows the use of the odm_err_msg subroutine:
#include <odmi.h> char *error_message; ... /*--------------------------------------------------------------*/ /*ODMErrno was returned from a previous ODM subroutine call.*/ /*--------------------------------------------------------------*/ returnstatus = odm_err_msg ( odmerrno, &error_message ); if ( returnstatus < 0 ) printf ( "Retrieval of error message failed\n" ); else printf ( error_message );
This subroutine is part of Base Operating System (BOS) Runtime.
ODM Error Codes in AIX Version 4.3 Technical Reference: Base Operating System and Extensions Volume 1 describes error codes.
List of ODM Commands and Subroutines.
See Appendix B, "ODM Error Codes" for explanations of the ODM error codes.
Object Data Manager (ODM) Overview for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.