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 * Exception during the validation of provided metadata.
23 *
24 * @author Jean-Christophe Malapert (jean-christophe.malapert@cnes.fr)
25 */
26 public class ValidationMetadataException extends Exception {
27
28 private static final long serialVersionUID = -6347065555603813330L;
29
30 /**
31 * Constructs a new ValidationMetadataException with null as its detail
32 * message. The cause is not initialized, and may subsequently be
33 * initialized by a call to ValidationMetadataException.initCause.
34 */
35 public ValidationMetadataException() {
36 super();
37 }
38
39 /**
40 * Constructs a ValidationMetadataException with the specified detail
41 * message. The cause is not initialized, and may subsequently be
42 * initialized by a call to DoiRuntimeException.initCause.
43 *
44 * @param message the detail message. The detail message is saved for later
45 * retrieval by the ValidationMetadataException.getMessage() method
46 */
47 public ValidationMetadataException(final String message) {
48 super(message);
49 }
50
51 /**
52 * Constructs a ValidationMetadataException with the specified cause and a
53 * detail message of (cause==null ? null : cause.toString()) (which
54 * typically contains the class and detail message of cause). This
55 * constructor is useful for ValidationMetadataException that are little
56 * more than wrappers for other throwables.
57 *
58 * @param cause the cause (which is saved for later retrieval by the
59 * ValidationMetadataException.getCause() method). (A null value is
60 * permitted, and indicates that the cause is nonexistent or unknown.)
61 */
62 public ValidationMetadataException(final Throwable cause) {
63 super(cause);
64 }
65
66 /**
67 * Constructs a ValidationMetadataException with the specified detail
68 * message and cause. Note that the detail message associated with cause is
69 * not automatically incorporated in this runtime exception's detail
70 * message.
71 *
72 * @param message the detail message (which is saved for later retrieval by
73 * the ValidationMetadataException.getMessage() method).
74 * @param cause the cause (which is saved for later retrieval by the
75 * ValidationMetadataException.getCause() method). (A null value is
76 * permitted, and indicates that the cause is nonexistent or unknown.)
77 */
78 public ValidationMetadataException(final String message,
79 final Throwable cause) {
80 super(message, cause);
81 }
82
83 }