fix NPE
This commit is contained in:
parent
da6a532edb
commit
c669c268f7
@ -20,6 +20,7 @@ public class CustomException extends RuntimeException {
|
||||
}
|
||||
|
||||
public CustomException(ICustomExceptionConfig iCustomExceptionConfig) {
|
||||
super(iCustomExceptionConfig.getMessage());
|
||||
this.code = iCustomExceptionConfig.getCode();
|
||||
this.message = iCustomExceptionConfig.getMessage();
|
||||
this.category = iCustomExceptionConfig.getCategory();
|
||||
@ -28,12 +29,14 @@ public class CustomException extends RuntimeException {
|
||||
|
||||
// 根据code与
|
||||
public CustomException(ICustomExceptionConfig iCustomExceptionConfig, Object data) {
|
||||
super(iCustomExceptionConfig.getMessage());
|
||||
this.code = iCustomExceptionConfig.getCode();
|
||||
this.message = iCustomExceptionConfig.getMessage();
|
||||
this.category = iCustomExceptionConfig.getCategory();
|
||||
this.data = data;
|
||||
}
|
||||
public CustomException(String category, String code, Object data) {
|
||||
super(HashMapCache.getInstance().getMessage(category, code));
|
||||
this.category = category;
|
||||
this.code = code;
|
||||
this.message = HashMapCache.getInstance().getMessage(category, code);
|
||||
|
Loading…
x
Reference in New Issue
Block a user