mas_error(3mas)


mas_error -- MAS error processing functions

Synopsis

   cc [options] file -lmas
   

#include <mas.h> int mas_errno(void); char *mas_errmsg(void); void mas_perror(void); void mas_error(char *func, char *str, int err, char *sysfunc);

Description

The mas_error functions set and return information about error conditions.

mas_errno returns an error number associated with the last error encountered. mas_errmsg returns a pointer to a character string that briefly describes the error. mas_perror prints mas_errmsg to stderr. The error message, mas_errmsg, is of the form:

   function: MAS_ERROR_CODE description
   

function: MAS_SYSERR description, system_call failed: errno string

where function is the name of the MAS function that encountered the error, MAS_ERROR_CODE is one of the error codes given below, and description is a brief string describing the error. In addition, if the error is MAS_SYSERR, indicating that an underlying system or library call has failed, system_call identifies the system or library call that failed, and errno is the error string as contained in sys_errlist.

If no error has been encountered by MAS, the error string is:

   mas_error: MAS_SUCCESS no errors

The function mas_error is used internally by MAS to set error conditions. Normally, applications should not call mas_error.

Return values

mas_errmsg returns a pointer to a MAS error string as described above.

mas_errno returns one of the MAS error codes given below.

mas_perror and mas_error have no return value.

Errors

Error Codes Condition
MAS_SUCCESS no error was encountered
MAS_ACCESS unknown access method requested
MAS_USAGE invalid use of MAS functions
MAS_INVALIDARG an invalid argument to a MAS function was detected
MAS_LIMIT mas has encountered a storage limit
MAS_NOFILEACCESS MAS cannot open or create a file
MAS_NOSUPPORT the requested operation is not supported
MAS_SANITY an internal structure or object has failed a sanity check
MAS_SYSERR a system call has failed
MAS_NOMETRIC the requested metric is not present in the metric registration table

 Error Codes        Condition
 MAS_SUCCESS        no error was encountered
 MAS_ACCESS         unknown access method requested
 MAS_USAGE          invalid use of MAS functions
 MAS_INVALIDARG     an invalid argument to a MAS function was detected
 MAS_LIMIT          mas has encountered a storage limit
 MAS_NOFILEACCESS   MAS cannot open or create a file
 MAS_NOSUPPORT      the requested operation is not supported
 MAS_SANITY         an internal structure or object has failed a sanity check
 MAS_SYSERR         a system call has failed
 MAS_NOMETRIC       the requested metric is not present in the metric registration table

References

Intro(3mas)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004