
com.wavefront.sdk.common.clients.exceptions.MultiClientIOException Maven / Gradle / Ivy
package com.wavefront.sdk.common.clients.exceptions;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class MultiClientIOException implements Iterable {
private final List exceptions = new ArrayList<>();
@Override
public Iterator iterator() {
return exceptions.iterator();
}
public void add(IOException exception) {
this.exceptions.add(exception);
}
public void checkAndThrow() throws CompositeIOException {
if (!exceptions.isEmpty())
throw new CompositeIOException(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy