rsanchez
2014-10-22 ddec2c5c7b7842536d6d705c2de20f96e16c8aa8
securis/src/main/java/net/curisit/securis/services/exception/SeCurisServiceException.java
....@@ -4,15 +4,20 @@
44
55 public class SeCurisServiceException extends CurisException {
66
7
- private int status = 0;
7
+ private int errorCode = 0;
88
9
- public SeCurisServiceException(int status, String msg) {
9
+ public SeCurisServiceException(int errorCode, String msg) {
1010 super(msg);
11
- this.status = status;
11
+ this.errorCode = errorCode;
12
+ }
13
+
14
+ public SeCurisServiceException(String msg) {
15
+ super(msg);
16
+ this.errorCode = ErrorCodes.UNEXPECTED_ERROR;
1217 }
1318
1419 public int getStatus() {
15
- return status;
20
+ return errorCode;
1621 }
1722
1823 /**
....@@ -24,8 +29,13 @@
2429 public static int UNEXPECTED_ERROR = 1000;
2530 public static int INVALID_CREDENTIALS = 1001;
2631 public static int UNAUTHORIZED_ACCESS = 1002;
27
-
32
+ public static int NOT_FOUND = 1003;
33
+ public static int INVALID_FORMAT = 1004;
34
+
2835 public static int INVALID_LICENSE_REQUEST_DATA = 1100;
2936 public static int LICENSE_NOT_READY_FOR_RENEW = 1101;
37
+
38
+ public static int INVALID_REQUEST_DATA = 1201;
39
+ public static int INVALID_REQUEST_DATA_FORMAT = 1202;
3040 }
3141 }