< prev index next >

src/java.base/share/classes/java/time/DateTimeException.java

Print this page




  60  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  61  */
  62 package java.time;
  63 
  64 /**
  65  * Exception used to indicate a problem while calculating a date-time.
  66  * <p>
  67  * This exception is used to indicate problems with creating, querying
  68  * and manipulating date-time objects.
  69  *
  70  * @implSpec
  71  * This class is intended for use in a single thread.
  72  *
  73  * @since 1.8
  74  */
  75 public class DateTimeException extends RuntimeException {
  76 
  77     /**
  78      * Serialization version.
  79      */

  80     private static final long serialVersionUID = -1632418723876261839L;
  81 
  82     /**
  83      * Constructs a new date-time exception with the specified message.
  84      *
  85      * @param message  the message to use for this exception, may be null
  86      */
  87     public DateTimeException(String message) {
  88         super(message);
  89     }
  90 
  91     /**
  92      * Constructs a new date-time exception with the specified message and cause.
  93      *
  94      * @param message  the message to use for this exception, may be null
  95      * @param cause  the cause of the exception, may be null
  96      */
  97     public DateTimeException(String message, Throwable cause) {
  98         super(message, cause);
  99     }


  60  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  61  */
  62 package java.time;
  63 
  64 /**
  65  * Exception used to indicate a problem while calculating a date-time.
  66  * <p>
  67  * This exception is used to indicate problems with creating, querying
  68  * and manipulating date-time objects.
  69  *
  70  * @implSpec
  71  * This class is intended for use in a single thread.
  72  *
  73  * @since 1.8
  74  */
  75 public class DateTimeException extends RuntimeException {
  76 
  77     /**
  78      * Serialization version.
  79      */
  80     @java.io.Serial
  81     private static final long serialVersionUID = -1632418723876261839L;
  82 
  83     /**
  84      * Constructs a new date-time exception with the specified message.
  85      *
  86      * @param message  the message to use for this exception, may be null
  87      */
  88     public DateTimeException(String message) {
  89         super(message);
  90     }
  91 
  92     /**
  93      * Constructs a new date-time exception with the specified message and cause.
  94      *
  95      * @param message  the message to use for this exception, may be null
  96      * @param cause  the cause of the exception, may be null
  97      */
  98     public DateTimeException(String message, Throwable cause) {
  99         super(message, cause);
 100     }
< prev index next >