CPXgeterrorstring


Description

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

Return Value

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

Synopsis

  char *CPXgeterrorstring (CPXCENVptr env,
                           int errcode,
                           char *buffer_str);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

int errcode

The error code to be translated.

char *buffer_str

A character string buffer of at least 510 characters to hold the error string.

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);
        }

See Also

Example lpex1.c in the CPLEX User's Manual.

Previous Page: CPXgetdsbcnt Return to Top Next Page: CPXgetgenclqcnt