1
|
package eu.dnetlib.repo.manager.domain;
|
2
|
|
3
|
/**
|
4
|
* Created by nikonas on 7/12/15.
|
5
|
*/
|
6
|
public class ValidationServiceException extends Exception{
|
7
|
|
8
|
public enum ErrorCode{
|
9
|
NO_ADMIN_EMAILS,
|
10
|
NOT_VALID_BASEURL,
|
11
|
GENERAL_ERROR, NOT_VALID_SET
|
12
|
}
|
13
|
|
14
|
private ErrorCode errorCode = null;
|
15
|
|
16
|
public ValidationServiceException() {
|
17
|
}
|
18
|
|
19
|
public ValidationServiceException(ErrorCode errorCode) {
|
20
|
this.errorCode = errorCode;
|
21
|
}
|
22
|
|
23
|
public ValidationServiceException(String message, Throwable cause, ErrorCode errorCode) {
|
24
|
super(message, cause);
|
25
|
|
26
|
this.errorCode = errorCode;
|
27
|
}
|
28
|
|
29
|
public ValidationServiceException(String message, ErrorCode errorCode) {
|
30
|
super(message);
|
31
|
|
32
|
this.errorCode = errorCode;
|
33
|
}
|
34
|
|
35
|
public ValidationServiceException(Throwable cause, ErrorCode errorCode) {
|
36
|
super(cause);
|
37
|
|
38
|
this.errorCode = errorCode;
|
39
|
}
|
40
|
|
41
|
public ErrorCode getErrorCode() {
|
42
|
return errorCode;
|
43
|
}
|
44
|
}
|