Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@
import java.util.List;

public class AggregatedOperatorException extends OperatorException {

private final List<Exception> causes;

public AggregatedOperatorException(String message, Exception... exceptions) {
super(message);
super(message, exceptions != null && exceptions.length > 0 ? exceptions[0] : null);
this.causes = exceptions != null ? Arrays.asList(exceptions) : Collections.emptyList();
}

public AggregatedOperatorException(String message, List<Exception> exceptions) {
super(message);
super(message, exceptions != null && !exceptions.isEmpty() ? exceptions.get(0) : null);
this.causes = exceptions != null ? exceptions : Collections.emptyList();
}

public List<Exception> getAggregatedExceptions() {
return causes;
}

@Override
public String toString() {
return "AggregatedOperatorException{" +
"causes=" + causes +
'}';
}
}