XSLPgetlasterror


Purpose
Retrieve the error message corresponding to the last Xpress-SLP error during an SLP run
Synopsis
int XPRS_CC XSLPgetlasterror(XSLPprob Prob, int *Code, char *Buffer);
Arguments
Prob 
The current SLP problem.
Code 
Address of an integer to receive the message number of the last error. May be NULL if not required.
Buffer 
Character buffer to receive the error message. The error message will never be longer than 256 characters. May be NULL if not required.
Example
The following example checks the return code from reading a matrix. If the code is nonzero then an error has occurred, and the error number is retrieved for further processing.
int Error, Code;
if (Error=XSLPreadprob(Prob, "Matrix", "")) {
  XSLPgetlasterror(Prob, &Code, NULL);
  MyErrorHandler(Code);
}
Further information
In general, Xpress-SLP functions return a value of 32 to indicate a non-recoverable error. XSLPgetlasterror can retrieve the actual error number and message.
Related topics
XSLPgetmessagetype


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.