StdInterfaceException.java
877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package cn.com.glsx.stdinterface.common.exception;
import cn.com.glsx.stdinterface.common.enums.ResultEnum;
import lombok.Getter;
import lombok.Setter;
/**
* @author payu
*/
@Setter
@Getter
public class StdInterfaceException extends RuntimeException {
private String errorCode;
private String message;
public StdInterfaceException() {
}
public StdInterfaceException(String errorCode, String message) {
super(message);
this.errorCode = errorCode;
this.message = message;
}
public StdInterfaceException(ResultEnum resultEnum) {
this.errorCode = resultEnum.getCode();
this.message = resultEnum.getMessage();
}
public StdInterfaceException(Throwable cause) {
super(cause);
}
public StdInterfaceException(String message, Throwable cause) {
super(message, cause);
}
}