Class CalendricalPrintFieldException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CalendricalPrintFieldException
    extends CalendricalPrintException
    An exception thrown when an error occurs during printing due to a specific rule.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private CalendricalRule<?> rule
      The rule that caused the exception.
      private static long serialVersionUID
      A serialization identifier for this class.
      private java.lang.Integer value
      The value of the field that caused the exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CalendricalRule<?> getRule()
      Gets the rule that caused the exception.
      java.lang.Integer getValue()
      Gets the value of the field that caused the exception.
      • 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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        A serialization identifier for this class.
        See Also:
        Constant Field Values
      • rule

        private final CalendricalRule<?> rule
        The rule that caused the exception.
      • value

        private final java.lang.Integer value
        The value of the field that caused the exception.
    • Constructor Detail

      • CalendricalPrintFieldException

        public CalendricalPrintFieldException​(UnsupportedRuleException cause)
        Constructs a new exception wrapping the unsupported field exception.
        Parameters:
        cause - the exception cause, may be null
      • CalendricalPrintFieldException

        public CalendricalPrintFieldException​(DateTimeFieldRule<?> fieldRule,
                                              int value)
        Constructs a new exception creating a standard error message for unable to print a negative value.
        Parameters:
        fieldRule - the rule of the field that caused the exception, may be null
        value - the value of the field that caused the exception
      • CalendricalPrintFieldException

        public CalendricalPrintFieldException​(DateTimeFieldRule<?> fieldRule,
                                              int value,
                                              int maxWidth)
        Constructs a new exception creating a standard error message for exceeding padding width.
        Parameters:
        fieldRule - the rule of the field that caused the exception, may be null
        value - the value of the field that caused the exception
        maxWidth - the maximum print width
      • CalendricalPrintFieldException

        public CalendricalPrintFieldException​(java.lang.String msg,
                                              DateTimeFieldRule<?> fieldRule,
                                              int value)
        Constructs a new exception using the specified message.
        Parameters:
        fieldRule - the rule of the field that caused the exception, may be null
        value - the value of the field that caused the exception
    • Method Detail

      • getRule

        public CalendricalRule<?> getRule()
        Gets the rule that caused the exception.
        Returns:
        the field rule, null if unknown
      • getValue

        public java.lang.Integer getValue()
        Gets the value of the field that caused the exception.
        Returns:
        the field value, null if unknown