1
2
3
4
5 package org.fedoracommons.funapi;
6
7
8
9
10
11
12
13
14 public class UnapiException
15 extends Exception {
16
17 private static final long serialVersionUID = 1L;
18
19 private int code;
20
21 public UnapiException(int errorCode, String message, Throwable cause) {
22 super(message, cause);
23 code = errorCode;
24 }
25
26 public UnapiException(int errorCode, String message) {
27 this(errorCode, message, null);
28 }
29
30 public UnapiException(String message, Throwable cause) {
31 this(500, message, cause);
32 }
33
34 public UnapiException(String message) {
35 this(message, null);
36 }
37
38 public int getErrorCode() {
39 return code;
40 }
41 }