DateTimeException

  • DateTimeException signals problems encountered during date and time calculations in Java.

  • It's a subclass of RuntimeException and is used for issues with date-time object creation, queries, and manipulation.

  • It has known subclasses like DateTimeParseException, UnsupportedTemporalTypeException, and ZoneRulesException for specific error scenarios.

  • Developers can create DateTimeException instances with custom messages and underlying causes.

public class DateTimeException extends RuntimeException
Known Direct Subclasses

Exception used to indicate a problem while calculating a date-time.

This exception is used to indicate problems with creating, querying and manipulating date-time objects.

Public Constructor Summary

DateTimeException(String message)
Constructs a new date-time exception with the specified message.
DateTimeException(String message, Throwable cause)
Constructs a new date-time exception with the specified message and cause.

Inherited Method Summary

Public Constructors

public DateTimeException (String message)

Constructs a new date-time exception with the specified message.

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

public DateTimeException (String message, Throwable cause)

Constructs a new date-time exception 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