com.tngtech.configbuilder.exception.ValidatorException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of config-builder Show documentation
Show all versions of config-builder Show documentation
The Config Builder creates fully configured instances of config classes, using values from various sources like properties files, command line arguments etc.
package com.tngtech.configbuilder.exception;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import javax.validation.ConstraintViolation;
import java.util.Set;
public class ValidatorException extends RuntimeException {
Set constraintViolations;
public ValidatorException(String message, Set> constraintViolations) {
super(message);
this.constraintViolations = Sets.newHashSet(Iterables.transform(constraintViolations, new Function, ConstraintViolation>() {
@Override
public ConstraintViolation apply(ConstraintViolation constraintViolation) {
return constraintViolation;
}
}));
}
public ValidatorException(String message, Throwable e) {
super(message, e);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy