mirror of
https://codeberg.org/PGPainless/cert-d-java.git
synced 2024-11-22 07:22:06 +01:00
Throw detailled error message when bad data is encountered
This commit is contained in:
parent
1b63a4ac9a
commit
304d6c29e4
1 changed files with 3 additions and 2 deletions
|
@ -51,9 +51,10 @@ public class FilenameResolver {
|
|||
*
|
||||
* @throws BadNameException in case the given special name is not known
|
||||
*/
|
||||
public File getCertFileBySpecialName(String specialName) throws BadNameException {
|
||||
public File getCertFileBySpecialName(String specialName)
|
||||
throws BadNameException {
|
||||
if (!isSpecialName(specialName)) {
|
||||
throw new BadNameException();
|
||||
throw new BadNameException(String.format("%s is not a known special name", specialName));
|
||||
}
|
||||
|
||||
return new File(getBaseDirectory(), specialName);
|
||||
|
|
Loading…
Reference in a new issue