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