Class CalendricalRuleException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IllegalCalendarFieldValueException, InvalidCalendarFieldException, UnsupportedRuleException

public class CalendricalRuleException extends CalendricalException
An exception used when an exception is connected to a specified rule.
See Also:
  • Field Details

    • serialVersionUID

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

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

    • CalendricalRuleException

      public CalendricalRuleException(String message, CalendricalRule<?> fieldRule)
      Constructs a new exception with a message and optional rule.
      Parameters:
      message - the message describing the problem, should not be null
      fieldRule - the rule of the field that is not supported, may be null
  • Method Details

    • getRule

      public CalendricalRule<?> getRule()
      Gets the rule that is connected to the exception.
      Returns:
      the field rule, null if unknown