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

io.fabric8.maven.docker.access.DockerAccessException Maven / Gradle / Ivy

There is a newer version: 0.45.0
Show newest version
package io.fabric8.maven.docker.access;

import java.io.IOException;

/**
 * Exception thrown if access to the docker host fails
 *
 * @author roland
 * @since 20.10.14
 */
public class DockerAccessException extends IOException {

    /**
     * Constructor
     *
     * @param cause root cause
     * @param message error message
     */
    public DockerAccessException(Throwable cause, String message) {
        super(message, cause);
    }

    public DockerAccessException(String message) {
        super(message);
    }

    public DockerAccessException(String format, Object...args) {
        super(String.format(format, args));
    }

    public DockerAccessException(Throwable cause, String format, Object ... args) {
        super(String.format(format, args),cause);
    }

    @Override
    public String getMessage() {
        if (getCause() != null) {
            return String.format("%s : %s", super.getMessage(), getCause().getMessage());
        } else {
            return super.getMessage();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy