Project

General

Profile

1 35043 antonis.le
package eu.dnetlib.goldoa.domain;
2
3
import java.io.Serializable;
4
5
/**
6
 * Created by antleb on 3/4/15.
7
 */
8 35156 antonis.le
public class PersonManagerException extends Exception {
9 35043 antonis.le
10
	public enum ErrorCause implements Serializable {
11 35163 antonis.le
		ALREADY_EXISTS, NOT_EXISTS, WRONG_EMAIL_OR_PASSWORD, NOT_ACTIVATED, TOKEN_EXPIRED, EMAIL_ERROR;
12 35043 antonis.le
	}
13
14 35049 antonis.le
	private ErrorCause errorCause;
15 35043 antonis.le
16 35156 antonis.le
	public PersonManagerException(ErrorCause errorCause) {
17 35043 antonis.le
		this.errorCause = errorCause;
18
	}
19
20 35156 antonis.le
	public PersonManagerException() {
21 35049 antonis.le
	}
22
23 35043 antonis.le
	public ErrorCause getErrorCause() {
24
		return errorCause;
25
	}
26 35049 antonis.le
27
	public void setErrorCause(ErrorCause errorCause) {
28
		this.errorCause = errorCause;
29
	}
30 35043 antonis.le
}