Class AttributeException

  • All Implemented Interfaces:
    java.io.Serializable

    public class AttributeException
    extends CoffeeGrinderException
    Exceptions that arise processing the attributes of a symbol or token.

    These are generally caused by errors in how the API is used.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributeException​(java.lang.String code, java.lang.String message)
      An attribute exception with a message.
      AttributeException​(java.lang.String code, java.lang.String message, java.lang.Throwable cause)
      An attribute exception with an underlying cause.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AttributeException immutable​(java.lang.String name, java.lang.String value)
      Raised if an attempt is made to modify an existing attribute.
      static AttributeException invalidOPTIONAL​(java.lang.String value)
      Raised if an attempt is made to set an invalid option value.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AttributeException

        public AttributeException​(java.lang.String code,
                                  java.lang.String message)
        An attribute exception with a message.
        Parameters:
        code - the code
        message - the message
      • AttributeException

        public AttributeException​(java.lang.String code,
                                  java.lang.String message,
                                  java.lang.Throwable cause)
        An attribute exception with an underlying cause.
        Parameters:
        code - the code
        message - the message
        cause - the cause
    • Method Detail

      • invalidOPTIONAL

        public static AttributeException invalidOPTIONAL​(java.lang.String value)
        Raised if an attempt is made to set an invalid option value.
        Parameters:
        value - the value.
        Returns:
        an AttributeException.
      • immutable

        public static AttributeException immutable​(java.lang.String name,
                                                   java.lang.String value)
        Raised if an attempt is made to modify an existing attribute.
        Parameters:
        name - the attribute name.
        value - the value.
        Returns:
        an AttributeException.