Use standard BazelCrashUtils when exiting nested set deserialization on interruption.
(Sorry, forgot about this utility.)
PiperOrigin-RevId: 227688890
diff --git a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java
index 396e6c5..bb4abdd 100644
--- a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java
+++ b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSet.java
@@ -25,7 +25,7 @@
import com.google.devtools.build.lib.collect.compacthashset.CompactHashSet;
import com.google.devtools.build.lib.concurrent.MoreFutures;
import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
-import com.google.devtools.build.lib.util.CustomExitCodePublisher;
+import com.google.devtools.build.lib.util.BazelCrashUtils;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.protobuf.ByteString;
import java.util.AbstractCollection;
@@ -199,11 +199,10 @@
return MoreFutures.waitForFutureAndGet((ListenableFuture<Object[]>) children);
} catch (InterruptedException e) {
System.err.println(
- "An interrupted exception occurred during nested set deserialization,"
+ "An interrupted exception occurred during nested set deserialization, "
+ "exiting abruptly.");
- CustomExitCodePublisher.maybeWriteExitStatusFile(ExitCode.INTERRUPTED.getNumericExitCode());
- Runtime.getRuntime().halt(ExitCode.INTERRUPTED.getNumericExitCode());
- throw new IllegalStateException("Server should have shutdown.", e);
+ BazelCrashUtils.halt(e, ExitCode.INTERRUPTED.getNumericExitCode());
+ throw new IllegalStateException("Server should have shut down.", e);
}
} else {
return children;