Package javax.time.calendar.format
Class CalendricalPrintFieldException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.time.CalendricalException
javax.time.calendar.format.CalendricalPrintException
javax.time.calendar.format.CalendricalPrintFieldException
- All Implemented Interfaces:
Serializable
An exception thrown when an error occurs during printing due to a specific rule.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CalendricalRule<?>
The rule that caused the exception.private static final long
A serialization identifier for this class.private final Integer
The value of the field that caused the exception. -
Constructor Summary
ConstructorsConstructorDescriptionCalendricalPrintFieldException
(String msg, DateTimeFieldRule<?> fieldRule, int value) Constructs a new exception using the specified message.CalendricalPrintFieldException
(DateTimeFieldRule<?> fieldRule, int value) Constructs a new exception creating a standard error message for unable to print a negative value.CalendricalPrintFieldException
(DateTimeFieldRule<?> fieldRule, int value, int maxWidth) Constructs a new exception creating a standard error message for exceeding padding width.Constructs a new exception wrapping the unsupported field exception. -
Method Summary
Methods inherited from class javax.time.calendar.format.CalendricalPrintException
rethrowIOException
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDA serialization identifier for this class.- See Also:
-
rule
The rule that caused the exception. -
value
The value of the field that caused the exception.
-
-
Constructor Details
-
CalendricalPrintFieldException
Constructs a new exception wrapping the unsupported field exception.- Parameters:
cause
- the exception cause, may be null
-
CalendricalPrintFieldException
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 nullvalue
- the value of the field that caused the exception
-
CalendricalPrintFieldException
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 nullvalue
- the value of the field that caused the exceptionmaxWidth
- the maximum print width
-
CalendricalPrintFieldException
Constructs a new exception using the specified message.- Parameters:
fieldRule
- the rule of the field that caused the exception, may be nullvalue
- the value of the field that caused the exception
-
-
Method Details
-
getRule
Gets the rule that caused the exception.- Returns:
- the field rule, null if unknown
-
getValue
Gets the value of the field that caused the exception.- Returns:
- the field value, null if unknown
-