View Javadoc

1   /*
2    * Copyright (C) 2017-2019 Centre National d'Etudes Spatiales (CNES).
3    *
4    * This library is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Lesser General Public
6    * License as published by the Free Software Foundation; either
7    * version 3.0 of the License, or (at your option) any later version.
8    *
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Lesser General Public License for more details.
13   *
14   * You should have received a copy of the GNU Lesser General Public
15   * License along with this library; if not, write to the Free Software
16   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17   * MA 02110-1301  USA
18   */
19  package fr.cnes.doi.exception;
20  
21  /**
22   * Runtime Exception for the project
23   *
24   * @author Claire
25   *
26   */
27  public class DoiRuntimeException extends RuntimeException {
28  
29      /**
30       * serialVersionUID.
31       */
32      private static final long serialVersionUID = 1589749416315841115L;
33  
34      /**
35       * Constructs a new runtime exception with null as its detail message. The
36       * cause is not initialized, and may subsequently be initialized by a call
37       * to DoiRuntimeException.initCause.
38       */
39      public DoiRuntimeException() {
40          super();
41      }
42  
43      /**
44       * Constructs a new runtime exception with the specified detail message and
45       * cause. Note that the detail message associated with cause is not
46       * automatically incorporated in this runtime exception's detail message.
47       *
48       * @param message the detail message (which is saved for later retrieval by
49       * the DoiRuntimeException.getMessage() method).
50       * @param cause the cause (which is saved for later retrieval by the
51       * DoiRuntimeException.getCause() method). (A null value is permitted, and
52       * indicates that the cause is nonexistent or unknown.)
53       */
54      public DoiRuntimeException(final String message,
55              final Throwable cause) {
56          super(message, cause);
57      }
58  
59      /**
60       * Constructs a new runtime exception with the specified detail message. The
61       * cause is not initialized, and may subsequently be initialized by a call
62       * to DoiRuntimeException.initCause.
63       *
64       * @param message the detail message. The detail message is saved for later
65       * retrieval by the DoiRuntimeException.getMessage() method
66       */
67      public DoiRuntimeException(final String message) {
68          super(message);
69      }
70  
71      /**
72       * Constructs a new runtime exception with the specified cause and a detail
73       * message of (cause==null ? null : cause.toString()) (which typically
74       * contains the class and detail message of cause). This constructor is
75       * useful for runtime exceptions that are little more than wrappers for
76       * other throwables.
77       *
78       * @param cause the cause (which is saved for later retrieval by the
79       * DoiRuntimeException.getCause() method). (A null value is permitted, and
80       * indicates that the cause is nonexistent or unknown.)
81       */
82      public DoiRuntimeException(final Throwable cause) {
83          super(cause);
84      }
85  
86  }