diff options
Diffstat (limited to 'src/main/java/org/onap/music/exceptions')
-rw-r--r-- | src/main/java/org/onap/music/exceptions/MusicPolicyVoilationException.java | 14 | ||||
-rw-r--r-- | src/main/java/org/onap/music/exceptions/MusicServiceException.java | 33 |
2 files changed, 27 insertions, 20 deletions
diff --git a/src/main/java/org/onap/music/exceptions/MusicPolicyVoilationException.java b/src/main/java/org/onap/music/exceptions/MusicPolicyVoilationException.java index bade21a4..7de53c59 100644 --- a/src/main/java/org/onap/music/exceptions/MusicPolicyVoilationException.java +++ b/src/main/java/org/onap/music/exceptions/MusicPolicyVoilationException.java @@ -2,7 +2,9 @@ * ============LICENSE_START========================================== * org.onap.music * =================================================================== - * Copyright (c) 2017 AT&T Intellectual Property + * 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. @@ -36,7 +38,7 @@ public class MusicPolicyVoilationException extends Exception { * */ public MusicPolicyVoilationException() { - // TODO Auto-generated constructor stub + } /** @@ -44,7 +46,7 @@ public class MusicPolicyVoilationException extends Exception { */ public MusicPolicyVoilationException(String message) { super(message); - // TODO Auto-generated constructor stub + } /** @@ -52,7 +54,7 @@ public class MusicPolicyVoilationException extends Exception { */ public MusicPolicyVoilationException(Throwable cause) { super(cause); - // TODO Auto-generated constructor stub + } /** @@ -61,7 +63,7 @@ public class MusicPolicyVoilationException extends Exception { */ public MusicPolicyVoilationException(String message, Throwable cause) { super(message, cause); - // TODO Auto-generated constructor stub + } /** @@ -73,7 +75,7 @@ public class MusicPolicyVoilationException extends Exception { public MusicPolicyVoilationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); - // TODO Auto-generated constructor stub + } } 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; - } - } |