Merge "Not logged or rethrow this exception."
[aai/data-router.git] / src / main / java / org / onap / aai / datarouter / exception / BaseDataRouterException.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.onap.aai.datarouter.exception;
24
25 /*
26  * COPYRIGHT NOTICE: Copyright (c) 2016 Team Pacifica (Amdocs & AT&T) The contents and intellectual
27  * property contained herein, remain the property of Team Pacifica (Amdocs & AT&T).
28  */
29
30 import java.util.Locale;
31
32 /**
33  * Base SMAdaptor exception class.
34  */
35 public class BaseDataRouterException extends Exception {
36
37   /** Force serialVersionUID. */
38   private static final long serialVersionUID = -6663403070792969748L;
39
40   /** Default locale. */
41   public static final Locale LOCALE = Locale.US;
42
43   /** Exception id. */
44   private final String id;
45
46   /**
47    * Constructor.
48    * 
49    * @param id the incoming id.
50    */
51   public BaseDataRouterException(final String id) {
52     super();
53     this.id = id;
54   }
55
56   /**
57    * Constructor.
58    * 
59    * @param id the incoming id
60    * @param message the incoming message
61    */
62   public BaseDataRouterException(final String id, final String message) {
63     super(message);
64     this.id = id;
65   }
66
67   /**
68    * Constructor.
69    * 
70    * @param id the incoming id
71    * @param message the incoming message
72    * @param cause the incoming throwable
73    */
74   public BaseDataRouterException(final String id, final String message, final Throwable cause) {
75     super(message, cause);
76     this.id = id;
77   }
78
79   /**
80    * Get the exception id.
81    * 
82    * @return the exception id
83    */
84   public String getId() {
85     return this.id;
86   }
87 }