Skip to content
Merged
Show file tree
Hide file tree
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 @@ -118,7 +118,6 @@ public <T> MongoDBIterator<T> aggregate(ClientSession clientSession, List<? exte
// we need to be sure that the List is mutable
List<Bson> bsonOperations = new ArrayList<>(operations);
parseQueryOptions(bsonOperations, options);
System.out.println("bsonOperations = " + bsonOperations);
MongoDBIterator<T> iterator = null;
if (bsonOperations.size() > 0) {
long numMatches = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,21 @@ public static String run(String image, List<AbstractMap.SimpleEntry<String, Stri
// Execute command
Command cmd = new Command(commandLine);
cmd.run();
if (cmd.getExitValue() != 0) {
String stderr = cmd.getError();
int maxOutputContext = 1024;
if (stderr.length() > maxOutputContext) {
int length = stderr.length();
stderr = " ... (length: " + length + ") " + stderr.substring(length - maxOutputContext);
}
String stdout = cmd.getOutput();
if (stdout.length() > maxOutputContext) {
int length = stdout.length();
stdout = " ... (length: " + length + ") " + stdout.substring(length - maxOutputContext);
}
throw new IOException("Docker command failed with exit value " + cmd.getExitValue()
+ ": stdout:" + stdout + " stderr:" + stderr);
}

return commandLine;
}
Expand Down
Loading