[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

odm_err_msg Subroutine

Purpose

Returns an error message string.

Library

Object Data Manager Library (libodm.a)

Syntax

#include <odmi.h>
int odm_err_msg (ODMErrnoMessageString)
long ODMErrno;
char **MessageString;

Description

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.

Parameters

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.

Return Values

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.

Examples

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 );

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

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.


[ Previous | Next | Contents | Glossary | Home | Search ]