Enum DruidException.Category

    • Enum Constant Detail

      • DEFENSIVE

        public static final DruidException.Category DEFENSIVE
        Means that the exception is being created defensively, because we want to validate something but expect that it should never actually be hit. Using this category is good to provide an indication to future reviewers and developers that the case being checked is not intended to actually be able to occur in the wild.
      • INVALID_INPUT

        public static final DruidException.Category INVALID_INPUT
        Means that the input provided was malformed in some way. Generally speaking, it is hoped that errors of this category have messages written either targeting the USER or ADMIN personas as those are the general users of the APIs who could generate invalid inputs.
      • UNAUTHORIZED

        public static final DruidException.Category UNAUTHORIZED
        Means that the error is a problem with authorization.
      • FORBIDDEN

        public static final DruidException.Category FORBIDDEN
        Means that an action that was attempted is forbidden
      • NOT_FOUND

        public static final DruidException.Category NOT_FOUND
        Means that the requsted requested resource cannot be found.
      • CAPACITY_EXCEEDED

        public static final DruidException.Category CAPACITY_EXCEEDED
        Means that some capacity limit was exceeded, this could be due to throttling or due to some system limit
      • RUNTIME_FAILURE

        public static final DruidException.Category RUNTIME_FAILURE
        Indicates a server-side failure of some sort at runtime
      • UNSUPPORTED

        public static final DruidException.Category UNSUPPORTED
        Indicates some unsupported behavior was requested.
      • UNCATEGORIZED

        public static final DruidException.Category UNCATEGORIZED
        A catch-all for any time when we cannot come up with a meaningful categorization. This is hopefully only used when converting generic exceptions from frameworks and libraries that we do not control into DruidExceptions
    • Method Detail

      • values

        public static DruidException.Category[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DruidException.Category c : DruidException.Category.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

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

        public int getExpectedStatus()