Initializing help system before first use

# XSLPgetlasterror

Purpose
Retrieve the error message corresponding to the last Xpress NonLinear error during an SLP run
Topic area
Misc
Synopsis
`int XPRS_CC XSLPgetlasterror(XSLPprob prob, int *p_code, char *msg);`
Arguments

prob | The current SLP problem.
p_code | Address of an integer to receive the message number of the last error. May be NULL if not required.
msg | 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
1. In general, Xpress NonLinear functions return a value of 32 to indicate a non-recoverable error. XSLPgetlasterror can retrieve the actual error number and message.
2. In case no SLP error code was returned, the function will check the underlying XPRS libary for any errors reported.
Parent Topic Library functions and the programming interface

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.