This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

LSBBException Class

class localsolverblackbox::LSBBException

LocalSolverBlackBox exception.

If an error occurred, LocalSolverBlackBox throws a specific exception which contains useful info for debugging purposes.

Functions

LSBBException(LSBBErrorCode errorCode, const std::string &fileName, int lineNumber, const std::string &functionName, const std::string &explanation)

Constructor.

Parameters:
  • errorCode - The code associated to this exception.
  • fileName - Name of the LocalSolverBlackBox source file where the exception is thrown.
  • lineNumber - Line number in the LocalSolverBlackBox source file where the exception is thrown.
  • functionName - Name of the function where the exception is thrown.
  • explanation - An explanation about the exception.

virtual ~LSBBException()

Destructor.

const std::string &getFileName() const

Gets the name of the LocalSolverBlackBox source file where the exception is thrown.

Only useful for LocalSolver’s maintenance team.

Return:File name.

int getLineNumber() const

Gets the line number in the LocalSolverBlackBox source file where the exception is thrown.

Only useful for LocalSolver’s maintenance team.

Return:Line number.

const std::string &getFunctionName() const

Gets the name of the function where the exception is thrown.

Return:Function name.

const std::string &getExplanation() const

Gets the explanation about the exception.

Return:Explanation.

const std::string &getMessage() const

Returns a string message with all useful info about the current exception.

Return:Exception message.

LSBBErrorCode getErrorCode() const

Returns the error code associated to this exception.

Return:Error code.

const char *what() const

Returns a C-style string explanation about the current exception.

Return:Exception message.

const std::string &toString() const

Same as getMessage().