2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
6 * ===================================================================
7 * Modifications Copyright (C) 2018 IBM.
8 * ===================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * ============LICENSE_END=============================================
22 * ====================================================================
25 package org.onap.music.exceptions;
31 public class MusicServiceException extends Exception {
34 private int errorCode;
35 private String errorMessage;
37 public MusicServiceException() {
42 public MusicServiceException(String message) {
47 public MusicServiceException(String message, int errorCode) {
49 this.errorCode=errorCode;
52 public MusicServiceException(String message, int errorCode, String errorMessage) {
54 this.errorCode=errorCode;
55 this.errorMessage=errorMessage;
58 public MusicServiceException(Throwable cause) {
64 public MusicServiceException(String message, Throwable cause) {
65 super(message, cause);
70 public MusicServiceException(String message, Throwable cause, boolean enableSuppression,
71 boolean writableStackTrace) {
72 super(message, cause, enableSuppression, writableStackTrace);
75 public void setErrorCode(int errorCode) {
76 this.errorCode=errorCode;
79 public int getErrorCode() {
82 public void setErrorMessage(String errorMessage) {
83 this.errorMessage=errorMessage;
85 public String getErrorMessage() {