All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tngtech.configbuilder.exception.ValidatorException Maven / Gradle / Ivy

Go to download

The Config Builder creates fully configured instances of config classes, using values from various sources like properties files, command line arguments etc.

There is a newer version: 1.8.1
Show newest version
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