NO FRAMES

CPXgeterrorstring

CPXCCHARptr CPXPUBLIC 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 parameter 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 510 characters to hold the error string.

Returns:

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