package de.avatic.lcc.util.exception.badrequest;

import de.avatic.lcc.util.exception.base.BadRequestException;

public class PropertyValidationException extends BadRequestException {

    public PropertyValidationException(String propertyName, String value, Exception e) {
        super("Invalid property value", "Value " + value + " not allowed for " + propertyName, e);
    }

    public PropertyValidationException(String propertyName, String condition, String conditionValue, String value) {
        super("Invalid property value", "Value has to be " + condition + " " + conditionValue + " for " + propertyName + " (Received value: " + value + ")", null);
    }
}
