Fix exception handling and add tests

This commit is contained in:
Paul Schaub 2022-02-09 23:35:44 +01:00
parent 117117b735
commit 3e1502ff2a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 29 additions and 3 deletions

View file

@ -75,7 +75,7 @@ public class EncryptCmd implements Runnable {
} catch (SOPGPException.UnsupportedOption unsupportedOption) {
throw new SOPGPException.UnsupportedOption("Unsupported option '--with-password'.", unsupportedOption);
} catch (IOException e) {
throw new SOPGPException.PasswordNotHumanReadable("Cannot read password from the provided password file " + passwordFileName, e);
throw new RuntimeException(e);
}
}