From 42abf8afc1dc1642e8aeae1dbb30fbcbdd866439 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 11 Apr 2023 11:44:26 -0700 Subject: [PATCH] Add exception message to 'failed to create output directory' It looks like all of the similar code paths in this file properly attach the exception message to the error message, while this one does not. Omitting the message makes it hard to figure out the root cause. While there, make a minor error message string formatting improvement. Closes #17951. PiperOrigin-RevId: 523461253 Change-Id: I96e434d0934c26ecc696cf386362ee17a6588cc5 --- .../devtools/build/lib/skyframe/SkyframeActionExecutor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 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 11a3d1dd6c86a3..29d13c4bb282ee 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 @@ -1394,7 +1394,8 @@ private void createActionFsOutputDirectories( action.getOutputs(), artifactPathResolver); } catch (CreateOutputDirectoryException e) { throw toActionExecutionException( - String.format("failed to create output directory '%s'", e.directoryPath), + String.format( + "failed to create output directory '%s': %s", e.directoryPath, e.getMessage()), e, action, null, @@ -1436,7 +1437,7 @@ private static void setupActionFsFileOutErr(FileOutErr fileOutErr, Action action } catch (IOException e) { String message = String.format( - "failed to create output directory for output streams'%s': %s", + "failed to create output directory for output streams '%s': %s", fileOutErr.getErrorPath(), e.getMessage()); DetailedExitCode code = createDetailedExitCode(message, Code.ACTION_FS_OUT_ERR_DIRECTORY_CREATION_FAILURE);