summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBharath Balasubramanian <bharathb@research.att.com>2018-12-20 06:38:14 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-20 06:38:14 +0000
commit93887e68ab4b9b14cb15c03a34e765bbeaa61d6a (patch)
treeed781ea7512e3eaa634664a61876dcae9ea7b11a /src
parent0768534363e9e6f2d6efd962fb1af94e5e9c166c (diff)
parent1bf4d6a13f4d84be263d0cbcd4492dfefb46ee19 (diff)
Merge "Fixed Sonar issue in MusicServiceException"
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/music/exceptions/MusicServiceException.java33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/main/java/org/onap/music/exceptions/MusicServiceException.java b/src/main/java/org/onap/music/exceptions/MusicServiceException.java
index 1f0264b3..76e1f948 100644
--- a/src/main/java/org/onap/music/exceptions/MusicServiceException.java
+++ b/src/main/java/org/onap/music/exceptions/MusicServiceException.java
@@ -4,6 +4,8 @@
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
* ===================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ===================================================================
* 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
@@ -41,8 +43,18 @@ public class MusicServiceException extends Exception {
super(message);
}
-
-
+
+ public MusicServiceException(String message, int errorCode) {
+ super(message);
+ this.errorCode=errorCode;
+ }
+
+ public MusicServiceException(String message, int errorCode, String errorMessage) {
+ super(message);
+ this.errorCode=errorCode;
+ this.errorMessage=errorMessage;
+ }
+
public MusicServiceException(Throwable cause) {
super(cause);
@@ -60,24 +72,17 @@ public class MusicServiceException extends Exception {
super(message, cause, enableSuppression, writableStackTrace);
}
+ public void setErrorCode(int errorCode) {
+ this.errorCode=errorCode;
+ }
public int getErrorCode() {
return errorCode;
}
-
-
- public void setErrorCode(int errorCode) {
- this.errorCode = errorCode;
+ public void setErrorMessage(String errorMessage) {
+ this.errorMessage=errorMessage;
}
-
-
public String getErrorMessage() {
return errorMessage;
}
-
-
- public void setErrorMessage(String errorMessage) {
- this.errorMessage = errorMessage;
- }
-
}