Skip to content

Commit

Permalink
Add exception message to 'failed to create output directory'
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EdSchouten committed Apr 3, 2023
1 parent f3e11c5 commit cdb04dc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,9 @@ 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,
Expand Down Expand Up @@ -1338,7 +1340,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);
Expand Down

0 comments on commit cdb04dc

Please sign in to comment.