Home | Previous Page | Next Page   Function Descriptions >

mi_error_level( )

The mi_error_level( ) function retrieves from an error descriptor the exception level associated with an exception or an error level associated with a client LIBMI error.

Syntax

mi_integer mi_error_level(err_desc)
   MI_ERROR_DESC *err_desc;
err_desc
is a pointer to an error descriptor that describes an MI_Exception or MI_Client_Library_Error event.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_error_level( ) function returns an error level from the error descriptor that err_desc references. This error level can be either an exception level for a database server exception or an error level for a client LIBMI error:

Return Values

MI_LIB_BADARG MI_LIB_USAGE MI_LIB_INTERR MI_LIB_NOIMP MI_LIB_DROPCONN MI_LIB_BADSERV

Any of these values indicates that the event that the error descriptor describes is MI_Client_Library_Error. The return value indicates the cause of the client LIBMI error.

MI_MESSAGE MI_EXCEPTION

Either of these values indicates that the event that the error descriptor describes is MI_Exception. The return value indicates the type of exception: warning (MI_MESSAGE) or error (MI_EXCEPTION).

MI_ERROR

This value indicates that the function was not successful.

Related Topics

See also the descriptions of mi_errmsg( ), mi_error_desc_copy( ), mi_error_desc_destroy( ), mi_error_desc_finish( ), mi_error_desc_is_copy( ), mi_error_desc_next( ), mi_error_sql_state( ), and mi_error_sqlcode( ).

For a general discussion on how to obtain information from an error descriptor, see the IBM Informix: DataBlade API Programmer's Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]