Package org.apache.ignite.lang
Class ErrorGroups
java.lang.Object
org.apache.ignite.lang.ErrorGroups
Defines error groups and its errors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAuthentication error group.static classCatalog error group.static classClient error group.static classCode deployment error group.static classCommon error group.static classConfiguration error group.static classCompute error group.static classCritical workers error group.static classDisaster recovery error group.static classDistribution zones error group.static classEmbedded API error group.static classGarbage collector error group.static classDeprecated.The whole group is unused.static classMarshalling error group.static classMeta storage error group.static classNetwork error group.static classNode configuration error group.static classPlacement driver error group.static classReplicator error group.static classREST service error group.static classSQL error group.static classStorage error group.static classTables error group.static classTransactions error group. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAdditional prefix that is used in a human-readable format of ignite errors. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorGrouperrorGroupByCode(int code) Returns error group identified by the given errorcode.static ErrorGrouperrorGroupByGroupCode(short groupCode) Returns error group identified by the givengroupCode.static @Nullable StringextractCauseMessage(String errorMessage) Returns a message extracted from the givenerrorMessageif thiserrorMessagematchesEXCEPTION_MESSAGE_PATTERN.static shortextractGroupCode(int code) Returns group code extracted from the given full error code.static voidInitializes and register all error groups and error codes.static ErrorGroupregisterGroup(String groupName, short groupCode) Creates a new error group with the givengroupNameandgroupCodeand default error prefix.static ErrorGroupregisterGroup(String errorPrefix, String groupName, short groupCode) Creates a new error group with the givengroupNameandgroupCode.
-
Field Details
-
IGNITE_ERR_PREFIX
Additional prefix that is used in a human-readable format of ignite errors.- See Also:
-
-
Constructor Details
-
ErrorGroups
public ErrorGroups()
-
-
Method Details
-
initialize
public static void initialize()Initializes and register all error groups and error codes. -
registerGroup
Creates a new error group with the givengroupNameandgroupCodeand default error prefix.- Parameters:
groupName- Group name to be created.groupCode- Group code to be created.- Returns:
- New error group.
- Throws:
IllegalArgumentException- If the specified name or group code already registered. Also, this exception is thrown if the givengroupNameisnullor empty.
-
registerGroup
Creates a new error group with the givengroupNameandgroupCode.- Parameters:
errorPrefix- Error prefix which should be used for the created error group.groupName- Group name to be created.groupCode- Group code to be created.- Returns:
- New error group.
- Throws:
IllegalArgumentException- If the specified name or group code already registered. Also, this exception is thrown if the givengroupNameisnullor empty.
-
extractCauseMessage
Returns a message extracted from the givenerrorMessageif thiserrorMessagematchesEXCEPTION_MESSAGE_PATTERN. IferrorMessagedoes not match the pattern ornullthen returns the originalerrorMessage.- Parameters:
errorMessage- Message that is returned byThrowable.getMessage()- Returns:
- Extracted message.
-
extractGroupCode
public static short extractGroupCode(int code) Returns group code extracted from the given full error code.- Parameters:
code- Full error code.- Returns:
- Group code.
-
errorGroupByGroupCode
Returns error group identified by the givengroupCode.- Parameters:
groupCode- Group code- Returns:
- Error Group.
-
errorGroupByCode
Returns error group identified by the given errorcode.- Parameters:
code- Full error code- Returns:
- Error Group.
-