aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java b/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java
index 4cfa9aa2f8..10b484305a 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java
@@ -324,12 +324,13 @@ public interface SpawnResult {
explanation += ". Note: Remote connection/protocol failed with: " + errorDetail;
}
if (status() == Status.TIMEOUT) {
- Preconditions.checkState(
- getWallTime().isPresent(), "SpawnAction timed out but wall time wasn't set");
- explanation +=
- String.format(
- " (failed due to timeout after %.2f seconds.)",
- getWallTime().get().toMillis() / 1000.0);
+ if (getWallTime().isPresent()) {
+ explanation += String.format(
+ " (failed due to timeout after %.2f seconds.)",
+ getWallTime().get().toMillis() / 1000.0);
+ } else {
+ explanation += " (failed due to timeout.)";
+ }
} else if (status() == Status.OUT_OF_MEMORY) {
explanation += " (Remote action was terminated due to Out of Memory.)";
}