Include owner in createLockRef
[music.git] / music-core / src / main / java / org / onap / music / exceptions / MusicServiceException.java
1 /*
2  * ============LICENSE_START==========================================
3  * org.onap.music
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
12  * 
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  * 
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.
20  * 
21  * ============LICENSE_END=============================================
22  * ====================================================================
23  */
24
25 package org.onap.music.exceptions;
26
27 /**
28  * @author inam
29  *
30  */
31 public class MusicServiceException extends Exception {
32
33
34     private int errorCode;
35     private String errorMessage;
36
37     public MusicServiceException() {
38         super();
39     }
40
41
42     public MusicServiceException(String message) {
43         super(message);
44
45     }
46   
47     public MusicServiceException(String message, int errorCode) {
48         super(message);
49         this.errorCode=errorCode;
50     }
51   
52     public MusicServiceException(String message, int errorCode, String errorMessage) {
53         super(message);
54         this.errorCode=errorCode;
55         this.errorMessage=errorMessage;
56     }
57   
58     public MusicServiceException(Throwable cause) {
59         super(cause);
60
61     }
62
63
64     public MusicServiceException(String message, Throwable cause) {
65         super(message, cause);
66
67     }
68
69
70     public MusicServiceException(String message, Throwable cause, boolean enableSuppression,
71                                  boolean writableStackTrace) {
72         super(message, cause, enableSuppression, writableStackTrace);
73
74     }
75     public void setErrorCode(int errorCode) {
76         this.errorCode=errorCode;
77     }
78
79     public int getErrorCode() {
80         return errorCode;
81     }
82     public void setErrorMessage(String errorMessage) {
83         this.errorMessage=errorMessage;
84     }
85     public String getErrorMessage() {
86         return errorMessage;
87     }
88 }