mx-community/src/main/java/cn/allms/community/infrastructure/exception/BusinessException.java
xieYj 6d4d53054d 1. 帖子作者发布帖子,帖子标题可以为空,帖子内容不能为空,且不少于16个汉字;
2. 帖子可以加入不多于五个话题,且话题不能重复加入;
3. 帖子标题和内容通过内容过滤后方能发布,如果未能通过内容过滤,则需要经过运营审核之后才能发布。
2021-05-11 18:14:32 +08:00

85 lines
2.1 KiB
Java

package cn.allms.community.infrastructure.exception;
/**
* @author xieYj
* @date 2021/5/11 13:59
*/
public class BusinessException extends Exception {
/**
* 业务异常码
*/
private String code;
/**
* 业务异常参数
*/
private Object[] arguments;
public BusinessException() {
super();
}
public BusinessException(Throwable cause) {
super(cause);
}
public BusinessException(String message) {
super(message);
}
public BusinessException(String code, String message) {
super(message);
this.code = code;
}
public BusinessException(String message, Object[] arguments) {
super(message);
this.arguments = arguments;
}
public BusinessException(String code, String message, Object[] arguments) {
super(message);
this.code = code;
this.arguments = arguments;
}
public BusinessException(String message, Object[] arguments, Throwable cause) {
super(message, cause);
this.arguments = arguments;
}
public BusinessException(String code, String message, Object[] arguments, Throwable cause) {
super(message, cause);
this.code = code;
this.arguments = arguments;
}
public BusinessException(String message, Throwable cause) {
super(message, cause);
}
public BusinessException(String code, String message, Throwable cause) {
super(message, cause);
this.code = code;
}
public BusinessException(String message,
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public BusinessException(String code,
String message,
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
this.code = code;
}
}