mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-03 16:06:38 +00:00
上传后台管理系统代码
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
package com.java2nb.common.exception;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 自定义业务异常
|
||||
*/
|
||||
@Data
|
||||
public class BusinessException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String msg;
|
||||
private int code;
|
||||
|
||||
public BusinessException(int code,String msg) {
|
||||
//不调用父类Throwable的fillInStackTrace()方法生成栈追踪信息,提高应用性能
|
||||
//构造器之间的调用必须在第一行
|
||||
super(msg, null, false, false);
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user