summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java b/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java
new file mode 100644
index 0000000..a587f32
--- /dev/null
+++ b/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2017 Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.validation.csar;
+class ValidationException extends Exception{
+
+ private String errCode = "Validation_Exception";
+ private String errorMessage = "Error Message";
+ public ValidationException(){
+ super();
+ }
+
+ public ValidationException(String message){
+ super(message);
+ }
+
+ public ValidationException(String message, Throwable cause){
+ super(message,cause);
+ }
+
+ public ValidationException(String errCode, String message, Throwable cause){
+ super(message,cause);
+ this.errCode = errCode;
+ }
+
+ public String getErrCode() {
+ return this.errCode;
+ }
+ public String toString(){
+ return ("Exception Number = "+errorMessage) ;
+ }
+
+}