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

liquibase.exception.PreconditionErrorException Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package liquibase.exception;

import liquibase.changelog.DatabaseChangeLog;
import liquibase.precondition.Precondition;
import liquibase.precondition.core.ErrorPrecondition;

import java.util.ArrayList;
import java.util.List;

public class PreconditionErrorException extends Exception {

    private static final long serialVersionUID = 1L;
    private List erroredPreconditions;

    public PreconditionErrorException(String message, List erroredPreconditions) {
        super(message);
        this.erroredPreconditions = erroredPreconditions;
    }

    public PreconditionErrorException(Exception cause, DatabaseChangeLog changeLog, Precondition precondition) {
        this(new ErrorPrecondition(cause, changeLog, precondition));
    }

    public PreconditionErrorException(ErrorPrecondition errorPrecondition) {
        super("Precondition Error");
        this.erroredPreconditions = new ArrayList();
        erroredPreconditions.add(errorPrecondition);
    }

    public PreconditionErrorException(List errorPreconditions) {
        super("Precondition Error");
        this.erroredPreconditions = errorPreconditions;
    }

    public List getErrorPreconditions() {
        return erroredPreconditions;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy