From 55f69dc0baa0a4b8ee9a0276954885199aa4b742 Mon Sep 17 00:00:00 2001 From: Janak Ramakrishnan Date: Fri, 13 Jan 2017 04:57:36 +0000 Subject: 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 --- .../devtools/build/lib/skyframe/SkyframeActionExecutor.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe') 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); } } } -- cgit v1.2.3