23 lines
434 B
Java
23 lines
434 B
Java
package com.xiang.common.exception;
|
|
|
|
import lombok.Getter;
|
|
|
|
@Getter
|
|
public class BusinessException extends RuntimeException {
|
|
|
|
private final String ERROR_CODE = "500";
|
|
|
|
private final String code;
|
|
|
|
public BusinessException(String message) {
|
|
super(message);
|
|
this.code = ERROR_CODE;
|
|
}
|
|
|
|
public BusinessException(String code, String message) {
|
|
super(message);
|
|
this.code = code;
|
|
}
|
|
|
|
}
|