package tc.oc.pgm.features;

import javax.annotation.Nullable;

/**
 * A checked exception indicating a problem related to a particular {@link FeatureDefinition}
 */
public class FeatureDefinitionException extends Exception {

    private final FeatureDefinition featureDefinition;

    public FeatureDefinitionException(@Nullable String message, FeatureDefinition featureDefinition) {
        this(message, null, featureDefinition);
    }

    public FeatureDefinitionException(@Nullable String message, @Nullable Throwable cause, FeatureDefinition featureDefinition) {
        super(message, cause);
        this.featureDefinition = featureDefinition;
    }

    public FeatureDefinition featureDefinition() {
        return featureDefinition;
    }
}
