summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src
diff options
context:
space:
mode:
authorAvinashS <avinash.s@huawei.com>2017-09-20 18:42:56 +0530
committerAvinashS <avinash.s@huawei.com>2017-09-20 18:42:56 +0530
commit554973c890c5b794ba41422c5b73552ab8faf5f8 (patch)
treee49e55deedbd722800a0195dc583d94654851a69 /csarvalidation/src
parent5fd55c6e90731995a7d8c19f63d30ee8a6abb415 (diff)
Exception handling for VNF validation
Add initial customised exception handler class Change-Id: I319546d06579ee0dfbe164c09fc5fba89bcea652 IssueId: VNFSDK-46 Signed-off-by: AvinashS <avinash.s@huawei.com>
Diffstat (limited to 'csarvalidation/src')
-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) ;
+ }
+
+}