Skip to content

Commit 27e4c62

Browse files
EdSchoutencopybara-github
authored andcommitted
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 bazelbuild#17951. PiperOrigin-RevId: 523461253 Change-Id: I96e434d0934c26ecc696cf386362ee17a6588cc5
1 parent 89a3d5e commit 27e4c62

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,8 @@ private void createActionFsOutputDirectories(
13041304
action.getOutputs(), artifactPathResolver);
13051305
} catch (CreateOutputDirectoryException e) {
13061306
throw toActionExecutionException(
1307-
String.format("failed to create output directory '%s'", e.directoryPath),
1307+
String.format(
1308+
"failed to create output directory '%s': %s", e.directoryPath, e.getMessage()),
13081309
e,
13091310
action,
13101311
null,
@@ -1346,7 +1347,7 @@ private static void setupActionFsFileOutErr(FileOutErr fileOutErr, Action action
13461347
} catch (IOException e) {
13471348
String message =
13481349
String.format(
1349-
"failed to create output directory for output streams'%s': %s",
1350+
"failed to create output directory for output streams '%s': %s",
13501351
fileOutErr.getErrorPath(), e.getMessage());
13511352
DetailedExitCode code =
13521353
createDetailedExitCode(message, Code.ACTION_FS_OUT_ERR_DIRECTORY_CREATION_FAILURE);

0 commit comments

Comments
 (0)