mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-09 10:19:47 +02:00
Properly throw CannotDecrypt exception with error message
This commit is contained in:
parent
e75dde1637
commit
c32ef9830b
4 changed files with 13 additions and 0 deletions
|
@ -106,6 +106,9 @@ public class DecryptCmd extends AbstractSopCmd {
|
|||
} catch (SOPGPException.BadData badData) {
|
||||
String errorMsg = getMsg("sop.error.input.stdin_not_a_message");
|
||||
throw new SOPGPException.BadData(errorMsg, badData);
|
||||
} catch (SOPGPException.CannotDecrypt e) {
|
||||
String errorMsg = getMsg("sop.error.runtime.cannot_decrypt_message");
|
||||
throw new SOPGPException.CannotDecrypt(errorMsg, e);
|
||||
} catch (IOException ioException) {
|
||||
throw new RuntimeException(ioException);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue