Skip to content

Commit

Permalink
Always add filename to detail message when available. Fix #7429.
Browse files Browse the repository at this point in the history
Former-commit-id: 8454db6b1a4053a5996b067f41267d13bcdefbfc
  • Loading branch information
dkocher committed Sep 6, 2013
1 parent e340916 commit 11b77ec
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -35,9 +35,11 @@ public BackgroundException map(final String message, final T failure) {
return exception;
}

public BackgroundException map(final String message, final T failure, final Path directory) {
public BackgroundException map(final String message, final T failure, final Path file) {
final BackgroundException exception = this.map(failure);
exception.setMessage(MessageFormat.format(StringUtils.chomp(LocaleFactory.localizedString(message, "Error")), directory.getName()));
exception.setMessage(String.format("%s (%s)",
MessageFormat.format(StringUtils.chomp(LocaleFactory.localizedString(message, "Error")), file.getName()),
file.getName()));
return exception;
}

Expand Down

0 comments on commit 11b77ec

Please sign in to comment.