forked from LibraryOfCongress/bagit-java
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs LibraryOfCongress#123 - fixed error message formatting
- Loading branch information
1 parent
eff1c35
commit fc8ef90
Showing
2 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 6 additions & 2 deletions
8
src/main/java/gov/loc/repository/bagit/exceptions/MissingPayloadDirectoryException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
package gov.loc.repository.bagit.exceptions; | ||
|
||
import java.nio.file.Path; | ||
|
||
import org.slf4j.helpers.MessageFormatter; | ||
|
||
/** | ||
* The payload directory is a required file. This class represents the error if it is not found. | ||
*/ | ||
public class MissingPayloadDirectoryException extends Exception { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public MissingPayloadDirectoryException(final String message){ | ||
super(message); | ||
public MissingPayloadDirectoryException(final String message, final Path path){ | ||
super(MessageFormatter.format(message, path).getMessage()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters