[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, 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 ( ODMErrno MessageString)
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 );

Related Information

Appendix B. ODM Error Codes in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 1 describes error codes.

List of ODM Commands and Subroutines.

See Appendix B, Appendix B. ODM Error Codes for explanations of the ODM error codes.

Object Data Manager (ODM) Overview for Programmers in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]