Skip to content

Commit

Permalink
Switch to sendNonFatalBugReport in Package, SkyframeBuildView a…
Browse files Browse the repository at this point in the history
…nd `SkyFunctionEnvironment`.

I also choose to add a new `sendNonFatalBugReport()` method, which takes message string and `args` as function parameters used to construct the `IllegalStateException`.

PiperOrigin-RevId: 567070739
Change-Id: I546b842961daf2812773a6d06725b11609492c5e
  • Loading branch information
yuyue730 authored and copybara-github committed Sep 20, 2023
1 parent c3d445a commit 36ca2ac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ FailureDetail getFailureDetail() {
}
}
if (undetailedEvents != null) {
BugReport.sendBugReport(
BugReport.sendNonFatalBugReport(
new IllegalStateException("Package has undetailed error from " + undetailedEvents));
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ private ImmutableSet<AspectKey> getDerivedAspectKeysForConflictReporting(
// couldn't be involved in the conflict exception anyway, and we just move on.
// Unless it's an unexpected interrupt that caused the exception.
if (e.getCause() instanceof InterruptedException) {
BugReport.sendBugReport(e);
BugReport.sendNonFatalBugReport(e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,9 @@ public <E1 extends Exception, E2 extends Exception, E3 extends Exception> SkyVal
public boolean queryDep(SkyKey key, QueryDepCallback resultCallback) {
SkyValue maybeWrappedValue = maybeGetValueFromErrorOrDeps(key);
if (maybeWrappedValue == null) {
BugReport.sendBugReport("Value for %s was missing, this should never happen", key);
BugReport.sendNonFatalBugReport(
new IllegalStateException(
String.format("Value for %s was missing, this should never happen", key)));
return false;
}
if (maybeWrappedValue == NULL_MARKER) {
Expand Down Expand Up @@ -671,7 +673,9 @@ SkyValue unwrapOrThrow(
@Nullable Class<E4> exceptionClass4)
throws E1, E2, E3, E4 {
if (maybeWrappedValue == null) {
BugReport.sendBugReport("Value for %s was missing, this should never happen", skyKey);
BugReport.sendNonFatalBugReport(
new IllegalStateException(
String.format("Value for %s was missing, this should never happen", skyKey)));
return null;
}
if (maybeWrappedValue == NULL_MARKER) {
Expand Down

0 comments on commit 36ca2ac

Please sign in to comment.