实时通讯
This commit is contained in:
22
src/main/java/com/realtime/exception/BusinessException.java
Normal file
22
src/main/java/com/realtime/exception/BusinessException.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.realtime.exception;
|
||||
|
||||
|
||||
import com.realtime.sysconst.enumConst.ResultEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class BusinessException extends RuntimeException {
|
||||
private Integer code;
|
||||
private ResultEnum result;
|
||||
|
||||
public BusinessException(ResultEnum result) {
|
||||
super(result.getMsg());
|
||||
this.code = result.getCode();
|
||||
}
|
||||
|
||||
public BusinessException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user