io.github.dengchen2020.core.exception.call.FieldErrorException Maven / Gradle / Ivy
package io.github.dengchen2020.core.exception.call;
import io.github.dengchen2020.core.exception.CallException;
import org.springframework.validation.FieldError;
import java.util.List;
/**
* 字段错误异常
*
* @author dengchen
* @since 2019/10/14 14:11
*/
public class FieldErrorException extends CallException {
private static final Integer CODE = 111;
private final List errors;
public List getErrors() {
return errors;
}
public FieldErrorException(Throwable cause, List errors) {
super("字段错误", cause, CODE);
this.errors = errors;
}
public FieldErrorException(List errors) {
this(null, errors);
}
public FieldErrorException(List errors,Boolean alarm) {
this(null, errors);
this.setAlarm(alarm);
}
}