diff options
author | Janak Ramakrishnan <janakr@google.com> | 2017-01-13 04:57:36 +0000 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-01-13 10:58:56 +0000 |
commit | 55f69dc0baa0a4b8ee9a0276954885199aa4b742 (patch) | |
tree | 1a7c448d57b320f9d4db8f823e414a3d678792ee /src/main/java/com/google/devtools/build | |
parent | cf32ab0c6737ee379eed761a06565fdd33f442d6 (diff) |
Log the IOException when an output was not successfully created. It's possible the exception has information we've been suppressing.
--
PiperOrigin-RevId: 144405370
MOS_MIGRATED_REVID=144405370
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java index 5c05596fc7..3c3b45589b 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java @@ -908,12 +908,18 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto } private static void reportMissingOutputFile( - Action action, Artifact output, Reporter reporter, boolean isSymlink) { + Action action, Artifact output, Reporter reporter, boolean isSymlink, IOException exception) { boolean genrule = action.getMnemonic().equals("Genrule"); String prefix = (genrule ? "declared output '" : "output '") + output.prettyPrint() + "' "; + logger.warning( + String.format( + "Error creating %s%s%s: %s", + isSymlink ? "symlink " : "", + prefix, + genrule ? " by genrule" : "", + exception.getMessage())); if (isSymlink) { String msg = prefix + "is a dangling symbolic link"; - logger.warning(msg); reporter.handle(Event.error(action.getOwner().getLocation(), msg)); } else { String suffix = genrule ? " by genrule. This is probably " @@ -958,7 +964,7 @@ public final class SkyframeActionExecutor implements ActionExecutionContextFacto reportOutputTreeArtifactErrors(action, output, reporter, e); } else { // Are all exceptions caught due to missing files? - reportMissingOutputFile(action, output, reporter, output.getPath().isSymbolicLink()); + reportMissingOutputFile(action, output, reporter, output.getPath().isSymbolicLink(), e); } } } |