From b1f1511910dec25dc4501808d6280f349f72d101 Mon Sep 17 00:00:00 2001 From: jhorvitz Date: Thu, 25 Mar 2021 17:45:32 -0700 Subject: [PATCH] Allow specifying a cause in `MissingNestedSetException`. PiperOrigin-RevId: 365161375 --- .../build/lib/collect/nestedset/NestedSetStore.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetStore.java b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetStore.java index c62b833cc1a465..b88805bccf0f46 100644 --- a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetStore.java +++ b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetStore.java @@ -79,8 +79,13 @@ public class NestedSetStore { * that does not exist in the store. */ public static final class MissingNestedSetException extends Exception { + public MissingNestedSetException(ByteString fingerprint) { - super("No NestedSet data for " + fingerprint); + this(fingerprint, /*cause=*/ null); + } + + public MissingNestedSetException(ByteString fingerprint, @Nullable Throwable cause) { + super("No NestedSet data for " + fingerprint, cause); } }