0efed763ce10ee8ac5f4e09a278829d369ce02f7
[appc.git] / appc-common / src / main / java / org / openecomp / appc / exceptions / APPCException.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * 
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.exceptions;
26
27 /**
28  * This is a base class for all APPC defined exceptions.
29  */
30
31 public class APPCException extends Exception {
32
33     /**
34      *
35      */
36     private static final long serialVersionUID = 1L;
37
38     /**
39      * Constructs a new exception with null as its detail message. The cause is not initialized, and may subsequently be
40      * initialized by a call to initCause.
41      */
42     public APPCException() {
43     }
44
45     /**
46      * Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently
47      * be initialized by a call to initCause.
48      * 
49      * @param message
50      *            the detail message. The detail message is saved for later retrieval by the getMessage() method.
51      */
52     public APPCException(String message) {
53         super(message);
54     }
55
56     /**
57      * Constructs a new exception with the specified cause and a detail message of (cause==null ? null :
58      * cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful
59      * for exceptions that are little more than wrappers for other throwables (for example,
60      * java.security.PrivilegedActionException).
61      * 
62      * @param cause
63      *            the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted,
64      *            and indicates that the cause is nonexistent or unknown.)
65      */
66     public APPCException(Throwable cause) {
67         super(cause);
68     }
69
70     /**
71      * 
72      Constructs a new exception with the specified detail message and cause.
73      * <p>
74      * Note that the detail message associated with cause is not automatically incorporated in this exception's detail
75      * message.
76      * </p>
77      * 
78      * @param message
79      *            the detail message (which is saved for later retrieval by the getMessage() method).
80      * @param cause
81      *            the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted,
82      *            and indicates that the cause is nonexistent or unknown.)
83      */
84     public APPCException(String message, Throwable cause) {
85         super(message, cause);
86     }
87
88     /**
89      * 
90      Constructs a new exception with the specified detail message, cause, suppression enabled or disabled, and
91      * writable stack trace enabled or disabled.
92      * 
93      * @param message
94      *            the detail message.
95      * @param cause
96      *            the cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
97      * @param enableSuppression
98      *            whether or not suppression is enabled or disabled
99      * @param writableStackTrace
100      *            whether or not the stack trace should be writable
101      */
102     public APPCException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
103         super(message, cause, enableSuppression, writableStackTrace);
104     }
105
106 }