Class CalendricalPrintFieldException

    • 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​(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 Integer getValue()
        Gets the value of the field that caused the exception.
        Returns:
        the field value, null if unknown