Enum CelErrorCode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CelErrorCode>

    public enum CelErrorCode
    extends java.lang.Enum<CelErrorCode>
    The canonical error codes for CEL
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CelErrorCode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CelErrorCode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • INTERNAL_ERROR

        public static final CelErrorCode INTERNAL_ERROR
        CEL encountered an unexpected error. This can range from CEL encountering impossible states, a failure with dependency or the exact cause of the error is otherwise unknown.
      • ATTRIBUTE_NOT_FOUND

        public static final CelErrorCode ATTRIBUTE_NOT_FOUND
        Map or object access using an unknown attribute.
      • INDEX_OUT_OF_BOUNDS

        public static final CelErrorCode INDEX_OUT_OF_BOUNDS
        List index is out of bounds.
      • DIVIDE_BY_ZERO

        public static final CelErrorCode DIVIDE_BY_ZERO
        Division by zero, also reported for modulus operations.
      • DUPLICATE_ATTRIBUTE

        public static final CelErrorCode DUPLICATE_ATTRIBUTE
        Map or object construction supplies same key value more than once.
      • INVALID_ARGUMENT

        public static final CelErrorCode INVALID_ARGUMENT
        Invalid argument supplied to a function.
      • OVERLOAD_NOT_FOUND

        public static final CelErrorCode OVERLOAD_NOT_FOUND
        Function defined, but no matching overload found.
      • AMBIGUOUS_OVERLOAD

        public static final CelErrorCode AMBIGUOUS_OVERLOAD
        Multiple matching overloads found.
      • TYPE_NOT_FOUND

        public static final CelErrorCode TYPE_NOT_FOUND
        Type definition could not be found.
      • NUMERIC_OVERFLOW

        public static final CelErrorCode NUMERIC_OVERFLOW
        Numeric overflow occurred due to arithmetic or conversions outside represented range.
      • ITERATION_BUDGET_EXCEEDED

        public static final CelErrorCode ITERATION_BUDGET_EXCEEDED
        Evaluation halted due to reaching the max number of iterations permitted within comprehension loops.
      • BAD_FORMAT

        public static final CelErrorCode BAD_FORMAT
        Conversion failed due to a mismatch in format specification.
    • Method Detail

      • values

        public static CelErrorCode[] 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 (CelErrorCode c : CelErrorCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CelErrorCode valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null