Initializing help system before first use

XPRSException

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

#include <xpress.hpp>

Inheritance diagram for xpress::XPRSException:
xpress::objects::NotInProblemException

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.

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.

XPRSException() [2/3]

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

Create a new exception.

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

XPRSException() [3/3]

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

Create a new exception.

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

Member Function Documentation

error() [1/5]

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

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.

error() [2/5]

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

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.

error() [3/5]

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

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.

error() [4/5]

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

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.

error() [5/5]

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

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.

getErrorCode()

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

Get the error code for this message.

Returns
The error code (may be UNKNOWN_ERROR).

licenseError()

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

Create a licensing error.

Parameters
code The error code that was returned by the licensing function.
Returns
An exception describing the last licensing error.

what()

virtual char const * xpress::XPRSException::what ( ) const
inlineoverridevirtualnoexcept

Get the error message for this exception.

  • Returns
    The error message.

The documentation for this class was generated from the following file:
  • xpress.hpp

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