Enum Class ErrorCode

java.lang.Object
java.lang.Enum<ErrorCode>
org.zvec.binding.ErrorCode
All Implemented Interfaces:
Serializable, Comparable<ErrorCode>, Constable

public enum ErrorCode extends Enum<ErrorCode>
Error codes returned by the Zvec C API. Maps to zvec_error_code_t in c_api.h.
  • Enum Constant Details

    • OK

      public static final ErrorCode OK
    • NOT_FOUND

      public static final ErrorCode NOT_FOUND
    • ALREADY_EXISTS

      public static final ErrorCode ALREADY_EXISTS
    • INVALID_ARGUMENT

      public static final ErrorCode INVALID_ARGUMENT
    • PERMISSION_DENIED

      public static final ErrorCode PERMISSION_DENIED
    • FAILED_PRECONDITION

      public static final ErrorCode FAILED_PRECONDITION
    • RESOURCE_EXHAUSTED

      public static final ErrorCode RESOURCE_EXHAUSTED
    • UNAVAILABLE

      public static final ErrorCode UNAVAILABLE
    • INTERNAL_ERROR

      public static final ErrorCode INTERNAL_ERROR
    • NOT_SUPPORTED

      public static final ErrorCode NOT_SUPPORTED
    • UNKNOWN

      public static final ErrorCode UNKNOWN
  • Method Details

    • values

      public static ErrorCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
    • fromCode

      public static ErrorCode fromCode(int code)
      Look up an ErrorCode by its integer value.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ErrorCode>