LocalSolver logo
is now
Hexaly logo

We're excited to share that we are moving forward. We're leaving behind the LocalSolver brand and transitioning to our new identity: Hexaly. This represents a leap forward in our mission to enable every organization to make better decisions faster when faced with operational and strategic challenges.

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.

LSErrorCode Enumeration

enum localsolver::LSErrorCode

List of error codes used by LSException.

EC_Api

Code used for errors related to API functions.

Used when you call a function in a wrong way or with inappropriate parameters.

Examples of error messages:

  • Argument ‘argName’ cannot be null.
  • Argument ‘argName’ does not belong to this instance of LocalSolver.
  • Argument ‘argName’ must be positive.
  • Argument ‘argName’ cannot be an empty string.
  • This method is only allowed in state Modeling (the model must not be closed).

EC_File

Code used when an error related to input/output operations occurs.

Examples of error messages:

  • File doesn’t exist.
  • File is corrupted.
  • Cannot open file.
  • File format is not recognized.

EC_Model

Code used when a problem related to the structure of the model occurs.

Examples of error messages:

  • At least one objective is required in the model.
  • A cycle of length ‘n’ was detected in the model.
  • Number of operands (‘n’) is too small: at least ‘m’ operands are expected for ‘operator’.
  • Operand ‘n’ of ‘operator’ must be ‘type’. Type provided: ‘otherType’.

EC_Callback

Code used when an error is encountered in a user callback.

EC_License

Code used when a problem related to licensing occurs.

That could be a problem with the license itself (expiration, hardware signature, ...), or a problem related to input/output or networking operations.

Examples of error messages:

  • Incorrect license number.
  • This license key is not compatible with the current hardware. Please contact your reseller.
  • Property prop is missing in file [file]
  • Fail to contact the token server. Check your connection.
  • This license is not compatible with the current hardware.
  • No token available. All tokens are currently in use.

EC_Solver

Code used when a problem occurs during the resolution.

EC_Internal

Internal LocalSolver error.

EC_Modeler

Code used when an error is encountered in the modeler.