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

com.opsbears.webcomponents.configuration.ConfigurationOptionInvalidValue Maven / Gradle / Ivy

There is a newer version: 1.0.0-alpha14
Show newest version
package com.opsbears.webcomponents.configuration;

import com.opsbears.webcomponents.typeconverter.TypeConversionFailedException;

import javax.annotation.ParametersAreNonnullByDefault;

@ParametersAreNonnullByDefault
public class ConfigurationOptionInvalidValue extends RuntimeException {
    private final String name;
    private final String expected;

    public ConfigurationOptionInvalidValue(
        String name,
        String expected,
        Object value,
        TypeConversionFailedException e
    ) {
        super("Invalid value for configuration option " + name + ", expected: " + expected + ", got: " + value.toString(), e);
        this.name = name;
        this.expected = expected;
    }

    public String getName() {
        return name;
    }

    public String getExpected() {
        return expected;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy