Initializing help system before first use

# XPRSException

Exception that indicates an error in the Xpress library. More...

Inheritance diagram for xpress::XPRSException:

## Public Member Functions
| XPRSException (char const *message)
| Create a new exception.
| XPRSException (int error)
| Create a new exception.
| XPRSException (std::string const &message)
| Create a new exception.
int | getErrorCode () const
| Get the error code for this message.
virtual char const * | what () const noexcept override
| Get the error message for this exception.

## Static Public Member Functions
static auto | error (XPRSbranchobject branchobject, int code) -> XPRSException
| Create an exception for an error with a branch object.
static auto | error (XPRSmipsolenum enumerator, int code) -> XPRSException
| Create an exception for an error with a solution enumerator.
static auto | error (XPRSmipsolpool pool, int code) -> XPRSException
| Create an exception for an error with a solution pool.
static auto | error (XPRSnamelist namelist, int code) -> XPRSException
| Create an exception for an error with a namelist.
static auto | error (XPRSprob prob, int code) -> XPRSException
| Create an exception for an error with a problem.
static auto | licenseError (int code) -> XPRSException
| Create a licensing error.

## Static Public Attributes
static constexpr int const | UNKNOWN_ERROR = std::numeric_limits<int>::min()
| Error code value that indicates an unknown error.

## Detailed Description

Exception that indicates an error in the Xpress library.

All errors in the Xpress library are reported by raising an instance of this exception.

Since
  44.00

## Constructor & Destructor Documentation

## XPRSException() [1/3]

xpress::XPRSException::XPRSException | ( | int | error | ) |
| inline

Create a new exception.

Parameters

  error | The error code that will be mentioned in the exception message.

Since
  44.00

## XPRSException() [2/3]

xpress::XPRSException::XPRSException | ( | char const * | message | ) |
| inline

Create a new exception.

The error code for the new exception will be `UNKNOWN_ERROR`.

Parameters

  message | The message for the new exception. This will be truncated to `XPRS_MAXMESSAGELENGTH` bytes.

Since
  44.00

## XPRSException() [3/3]

xpress::XPRSException::XPRSException | ( | std::string const & | message | ) |
| inline

Create a new exception.

The error code for the new exception will be `UNKNOWN_ERROR`.

Parameters

  message | The message for the new exception. This will be truncated to `XPRS_MAXMESSAGELENGTH` bytes.

Since
  44.00

## Member Function Documentation

## error() [1/5]

static auto xpress::XPRSException::error | ( | XPRSbranchobject | branchobject,
|  | int | code ) -> XPRSException
| inline static

Create an exception for an error with a branch object.

Parameters

  branchobject | The branch object that caused an error.
  code | The error code returned by the offending function.

Returns
  An exception describing the last error on the branch object.

Since
  44.00

## error() [2/5]

static auto xpress::XPRSException::error | ( | XPRSmipsolenum | enumerator,
|  | int | code ) -> XPRSException
| inline static

Create an exception for an error with a solution enumerator.

Parameters

  enumerator | The solution enumerator that caused an error.
  code | The error code returned by the offending function.

Returns
  An exception describing the last error on the enumerator.

Since
  44.00

## error() [3/5]

static auto xpress::XPRSException::error | ( | XPRSmipsolpool | pool,
|  | int | code ) -> XPRSException
| inline static

Create an exception for an error with a solution pool.

Parameters

  pool | The solution pool that caused an error.
  code | The error code returned by the offending function.

Returns
  An exception describing the last error on the pool.

Since
  44.00

## error() [4/5]

static auto xpress::XPRSException::error | ( | XPRSnamelist | namelist,
|  | int | code ) -> XPRSException
| inline static

Create an exception for an error with a namelist.

Parameters

  namelist | The namelist that caused an error.
  code | The error code returned by the offending function.

Returns
  An exception describing the last error on the namelist.

Since
  44.00

## error() [5/5]

static auto xpress::XPRSException::error | ( | XPRSprob | prob,
|  | int | code ) -> XPRSException
| inline static

Create an exception for an error with a problem.

Parameters

  prob | The problem that triggered the error.
  code | The error code returned by the offending function.

Returns
  An exception describing the last error on the problem.

Since
  44.00

## getErrorCode()

int xpress::XPRSException::getErrorCode | ( |  | ) | const
| inline

Get the error code for this message.

Returns
  The error code (may be `UNKNOWN_ERROR`).

Since
  44.00

## licenseError()

static auto xpress::XPRSException::licenseError | ( | int | code | ) | -> XPRSException
| inline static

Create a licensing error.

Parameters

  code | The error code that was returned by the licensing function.

Returns
  An exception describing the last licensing error.

Since
  44.00

## what()

virtual char const * xpress::XPRSException::what | ( |  | ) | const
| inline override virtual noexcept

Get the error message for this exception.

- Returns
    The error message.
  Since
    44.00

## Member Data Documentation

## UNKNOWN_ERROR

int const xpress::XPRSException::UNKNOWN_ERROR = std::numeric_limits<int>::min()
| inline static constexpr

Error code value that indicates an unknown error.

Since
  44.00

The documentation for this class was generated from the following file:

- xpress.hpp

Parent Topic xpress

© 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.