diff options
author | Peter Schmitt <schmitt@google.com> | 2017-02-07 20:45:03 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2017-02-08 15:51:25 +0000 |
commit | 386219306c6d2285fd1e4136eafc6806c50d5bd4 (patch) | |
tree | 9be362ec948908d3c68a975fba61f7d43bf73b57 /src/main/java | |
parent | 602a98cbebeff2ba1c2d8605a9552b2c8f5622ae (diff) |
Treat configuration errors as failures in the master log.
--
PiperOrigin-RevId: 146820813
MOS_MIGRATED_REVID=146820813
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java index 459bacade6..3c764fabe2 100644 --- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java +++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java @@ -234,6 +234,13 @@ public final class BuildTool { } catch (Error e) { catastrophe = true; throw e; + } catch (InvalidConfigurationException e) { + // TODO(gregce): With "global configurations" we cannot tie a configuration creation failure + // to a single target and have to halt the entire build. Once configurations are genuinely + // created as part of the analysis phase they should report their error on the level of the + // target(s) that triggered them. + catastrophe = true; + throw e; } finally { if (!catastrophe) { // Delete dirty nodes to ensure that they do not accumulate indefinitely. @@ -376,6 +383,11 @@ public final class BuildTool { } catch (InvalidConfigurationException e) { exitCode = ExitCode.COMMAND_LINE_ERROR; reportExceptionError(e); + // TODO(gregce): With "global configurations" we cannot tie a configuration creation failure + // to a single target and have to halt the entire build. Once configurations are genuinely + // created as part of the analysis phase they should report their error on the level of the + // target(s) that triggered them. + result.setCatastrophe(); } catch (AbruptExitException e) { exitCode = e.getExitCode(); reportExceptionError(e); |