NO FRAMES

CPXgeterrorstring

public CPXCCHARptr CPXgeterrorstring(CPXCENVptr env, int errcode, char * buffer_str)
Definition file: cplex.h

The routine CPXgeterrorstring returns an error message string corresponding to an error code. Error codes are returned by CPLEX routines when an error occurs.

Note

This routine allows the CPLEX environment argument to be NULL so that errors caused by the routine CPXopenCPLEX can be translated.

Example

   char *errstr;
        errstr = CPXgeterrorstring (env, errcode, buffer);
        if ( errstr != NULL ) {
           printf ("%s\n", buffer);
        }
        else {
           printf ("CPLEX Error %5d:  Unknown error code.\n",
                   errcode);
        }
 

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

errcode

The error code to be translated.

buffer_str

A character string buffer. This buffer must be at least 4096 characters to hold the error string.

Returns:

This routine returns a pointer to the argument buffer_str if the string does exist. In that case, buffer_str contains the error message string. It returns NULL if the error code does not have a corresponding string.