Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Do not hide BulkTransferException messages when there were more than one exception #14986

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 @@ -13,6 +13,7 @@
// limitations under the License.
package com.google.devtools.build.lib.remote.common;

import com.google.common.base.Joiner;
import java.io.IOException;

/**
Expand Down Expand Up @@ -57,6 +58,9 @@ public String getMessage() {
if (super.getSuppressed().length == 1) {
return super.getSuppressed()[0].getMessage();
}
return String.format("%d errors during bulk transfer", super.getSuppressed().length);
String errorSummary =
String.format("%d errors during bulk transfer:", super.getSuppressed().length);
String combinedSuberrors = Joiner.on('\n').join(super.getSuppressed());
return Joiner.on('\n').join(errorSummary, combinedSuberrors);
}
}