com.holly.unit.validator.api.exception.ParamValidateException Maven / Gradle / Ivy
package com.holly.unit.validator.api.exception;
import cn.hutool.core.util.StrUtil;
import com.holly.unit.core.exception.AbstractExceptionEnum;
import com.holly.unit.core.exception.base.ServiceException;
import com.holly.unit.validator.api.constants.ValidatorConstants;
/**
* 参数校验异常
*
* @author holly
* @date 2020/10/15 15:59
*/
public class ParamValidateException extends ServiceException {
public ParamValidateException(AbstractExceptionEnum exception, Object... params) {
super(ValidatorConstants.VALIDATOR_MODULE_NAME, exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params));
}
public ParamValidateException(AbstractExceptionEnum exception) {
super(ValidatorConstants.VALIDATOR_MODULE_NAME, exception);
}
}