Skip to content

Commit

Permalink
Treat configuration errors as failures in the master log.
Browse files Browse the repository at this point in the history
--
PiperOrigin-RevId: 146820813
MOS_MIGRATED_REVID=146820813
  • Loading branch information
aragos authored and kchodorow committed Feb 8, 2017
1 parent 602a98c commit 3862193
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ public void buildTargets(BuildRequest request, BuildResult result, TargetValidat
} 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.
Expand Down Expand Up @@ -376,6 +383,11 @@ public BuildResult processRequest(BuildRequest request, TargetValidator validato
} 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);
Expand Down

0 comments on commit 3862193

Please sign in to comment.