Package com.surrealdb
Enum Class ErrorKind
- All Implemented Interfaces:
Serializable,Comparable<ErrorKind>,Constable
Machine-readable error kind, aligned with the SurrealDB Rust SDK's
ErrorDetails enum.
Returned by ServerException.getKindEnum(). Use this for type-safe matching instead
of ServerException.getKind() when the kind is known. For unknown (future) kinds,
UNKNOWN is used and the raw string is available via ServerException.getKind().
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUnknown kind from a newer server; raw string is inServerException.getKind(). -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorKindfromString(String kind) Resolves a kind string from the wire to an enum constant.getRaw()Returns the wire string for this kind, ornullforUNKNOWN.static ErrorKindReturns the enum constant of this class with the specified name.static ErrorKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VALIDATION
-
CONFIGURATION
-
THROWN
-
QUERY
-
SERIALIZATION
-
NOT_ALLOWED
-
NOT_FOUND
-
ALREADY_EXISTS
-
CONNECTION
-
INTERNAL
-
UNKNOWN
Unknown kind from a newer server; raw string is inServerException.getKind().
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromString
-
getRaw
-