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 class
Authentication error group.static class
Catalog error group.static class
Client error group.static class
Code deployment error group.static class
Common error group.static class
Compute error group.static class
Critical workers error group.static class
Disaster recovery error group.static class
Distribution zones error group.static class
Embedded API error group.static class
Garbage collector error group.static class
Index error group.static class
Marshalling error group.static class
Meta storage error group.static class
Network error group.static class
Node configuration error group.static class
Placement driver error group.static class
Replicator error group.static class
REST service error group.static class
SQL error group.static class
Storage error group.static class
Tables error group.static class
Transactions error group. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Additional prefix that is used in a human-readable format of ignite errors. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorGroup
errorGroupByCode
(int code) Returns error group identified by the given errorcode
.static ErrorGroup
errorGroupByGroupCode
(short groupCode) Returns error group identified by the givengroupCode
.static @Nullable String
extractCauseMessage
(String errorMessage) Returns a message extracted from the givenerrorMessage
if thiserrorMessage
matchesEXCEPTION_MESSAGE_PATTERN
.static short
extractGroupCode
(int code) Returns group code extracted from the given full error code.static void
Initializes and register all error groups and error codes.static ErrorGroup
registerGroup
(String groupName, short groupCode) Creates a new error group with the givengroupName
andgroupCode
and default error prefix.static ErrorGroup
registerGroup
(String errorPrefix, String groupName, short groupCode) Creates a new error group with the givengroupName
andgroupCode
.
-
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 givengroupName
andgroupCode
and 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 givengroupName
isnull
or empty.
-
registerGroup
Creates a new error group with the givengroupName
andgroupCode
.- 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 givengroupName
isnull
or empty.
-
extractCauseMessage
Returns a message extracted from the givenerrorMessage
if thiserrorMessage
matchesEXCEPTION_MESSAGE_PATTERN
. IferrorMessage
does not match the pattern ornull
then 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.
-