From 795eab39b2e8a2b6a1344f1380d3ef0c0c32fffa Mon Sep 17 00:00:00 2001 From: jhorvitz Date: Tue, 7 Dec 2021 04:14:36 -0800 Subject: [PATCH] Fix crash with `--experimental_skyframe_prepare_analysis` by accepting any `DetailedException`. It is possible to get a `MissingInputFileException` if the file specified by `--platform_mappings` does not exist. We apparently don't have any tests for `--experimental_skyframe_prepare_analysis`. PiperOrigin-RevId: 414681532 --- .../google/devtools/build/lib/skyframe/SkyframeExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index a453c248ff234c..5267d3c60fb768 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -3037,8 +3037,8 @@ public PrepareAnalysisPhaseValue prepareAnalysisPhase( e = new InvalidConfigurationException( "cannot load build configuration because of this cycle", Code.CYCLE); - } else if (e instanceof NoSuchThingException) { - e = new InvalidConfigurationException(((NoSuchThingException) e).getDetailedExitCode(), e); + } else if (e instanceof DetailedException) { + e = new InvalidConfigurationException(((DetailedException) e).getDetailedExitCode(), e); } if (e != null) { Throwables.throwIfInstanceOf(e, InvalidConfigurationException.class);