Package localsolver

Enum LSErrorCode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LSErrorCode>

    public enum LSErrorCode
    extends java.lang.Enum<LSErrorCode>
    List of error codes used by LSException.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Api
      Code used for errors related to API functions.
      Callback
      Code used when an error is encountered in a user callback.
      Cloud
      Code used when an error is encountered while using the cloud service.
      File
      Code used when an error related to input/output operations occurs.
      Internal
      Internal LocalSolver error.
      License
      Code used when a problem related to licensing occurs.
      Model
      Code used when a problem related to the structure of the model occurs.
      Modeler
      Code used when an error is encountered in the modeler.
      Solver
      Code used when a problem occurs during the resolution.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static LSErrorCode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static LSErrorCode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • Api

        public static final LSErrorCode 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).
      • File

        public static final LSErrorCode 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.
      • Model

        public static final LSErrorCode 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'.
      • Callback

        public static final LSErrorCode Callback
        Code used when an error is encountered in a user callback.
      • License

        public static final LSErrorCode License
        Code used when a problem related to licensing occurs. That could be a problem with the license itself (expiration, hardware signature, etc.), 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.
      • Solver

        public static final LSErrorCode Solver
        Code used when a problem occurs during the resolution.
      • Internal

        public static final LSErrorCode Internal
        Internal LocalSolver error.
      • Modeler

        public static final LSErrorCode Modeler
        Code used when an error is encountered in the modeler.
      • Cloud

        public static final LSErrorCode Cloud
        Code used when an error is encountered while using the cloud service.
    • Method Detail

      • values

        public static LSErrorCode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LSErrorCode c : LSErrorCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LSErrorCode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null