Class ErrorGroup

java.lang.Object
org.apache.ignite.lang.ErrorGroup

public class ErrorGroup extends Object
This class represents a concept of error group. Error group defines a collection of errors that belong to a single semantic component. Each group can be identified by a name and an integer number that both must be unique across all error groups.
  • Method Details

    • errorPrefix

      public String errorPrefix()
      Returns a error prefix of this group.
      Returns:
      Error prefix.
    • name

      public String name()
      Returns a name of this group.
      Returns:
      Group name.
    • groupCode

      public short groupCode()
      Returns a code of this group.
      Returns:
      Group code.
    • registerErrorCode

      public int registerErrorCode(short errorCode)
      Registers a new error code within this error group.
      Parameters:
      errorCode - Error code to be registered.
      Returns:
      Full error code which includes group code and specific error code.
      Throws:
      IllegalArgumentException - If the given errorCode is already registered.
    • extractErrorCode

      public static short extractErrorCode(int code)
      Returns error code extracted from the given full error code.
      Parameters:
      code - Full error code.
      Returns:
      Error code.
    • errorMessage

      public static String errorMessage(UUID traceId, int code, String message)
      Creates a new error message with predefined prefix.
      Parameters:
      traceId - Unique identifier of this exception.
      code - Full error code.
      message - Original message.
      Returns:
      New error message with predefined prefix.
    • toString

      public String toString()
      Overrides:
      toString in class Object