package com.atlassian.bitbucket.installer.validation;

import com.atlassian.bitbucket.installer.InstallationException;

/**
 * An exception to be thrown when a validation fails but it's not necessary
 * for the user to correct their input before they continue. Typically this will
 * result in a warning option message for users.
 *
 * For now, this exception is thrown when a directory is detected not empty (used) on validation.
 * e.g. when checking the home directory or installation directory
 *
 * @todo: to rename SoftValidationException with a more proper name and also change HardValidationException to
 * ValidationException.
 *
 * @see <a href="https://stash.dev.internal.atlassian.com/projects/STASH/repos/stash/pull-requests/5462/overview?commentId=98882">The discussion</a>
 */
public class SoftValidationException extends InstallationException {
    public static final String ERROR_DIRECTORY_USED = "error.directory.used";
    public static final String ERROR_PORT_ELASTICSEARCH_USED = "error.port.elasticsearch.used";
    public static final String ERROR_PORT_ELASTICSEARCH_HTTP_USED = "error.port.elasticsearch.http.used";
    public static final String ERROR_PORT_ELASTICSEARCH_TRANSPORT_USED = "error.port.elasticsearch.transport.used";

    public SoftValidationException(String messageKey) {
        super(messageKey);
    }
}
