UnsupportedTemporalTypeException

  • UnsupportedTemporalTypeException signals that a ChronoField or ChronoUnit isn't supported by a Temporal class.

  • It's a subclass of DateTimeException and provides two constructors to detail the error.

  • Constructors allow for specifying an error message, and optionally, an underlying cause.

  • This exception typically arises when trying to access unsupported fields or perform incompatible temporal operations.

public class UnsupportedTemporalTypeException extends DateTimeException

UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is not supported for a Temporal class.

Public Constructor Summary

UnsupportedTemporalTypeException(String message)
Constructs a new UnsupportedTemporalTypeException with the specified message.
UnsupportedTemporalTypeException(String message, Throwable cause)
Constructs a new UnsupportedTemporalTypeException with the specified message and cause.

Inherited Method Summary

Public Constructors

public UnsupportedTemporalTypeException (String message)

Constructs a new UnsupportedTemporalTypeException with the specified message.

Parameters
message the message to use for this exception, may be null

public UnsupportedTemporalTypeException (String message, Throwable cause)

Constructs a new UnsupportedTemporalTypeException with the specified message and cause.

Parameters
message the message to use for this exception, may be null
cause the cause of the exception, may be null