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

coursierapi.error.DownloadingArtifactsError Maven / Gradle / Ivy

The newest version!
package coursierapi.error;

import java.util.HashMap;
import java.util.Map;

public class DownloadingArtifactsError extends FetchError {

    private final Map errors;

    private DownloadingArtifactsError(Map errors, String message) {
        super(message);
        this.errors = new HashMap<>(errors);
    }

    public static DownloadingArtifactsError of(Map errors) {
        StringBuilder b = new StringBuilder();
        for (Map.Entry entry : errors.entrySet()) {
            b.append(entry.getKey());
            b.append(": ");
            b.append(entry.getValue());
            b.append('\n');
        }
        return new DownloadingArtifactsError(errors, b.toString());
    }

    public Map getErrors() {
        return errors;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy