More logging relating to decryption failures.

This commit is contained in:
CalDescent 2022-08-20 12:45:20 +01:00
parent 4d97586f82
commit 8cd16792a2

View File

@ -437,7 +437,8 @@ public class ArbitraryDataReader {
} catch (NoSuchAlgorithmException | InvalidAlgorithmParameterException | NoSuchPaddingException
| BadPaddingException | IllegalBlockSizeException | IOException | InvalidKeyException e) {
throw new DataException(String.format("Unable to decrypt file at path %s: %s", this.filePath, e.getMessage()));
LOGGER.info(String.format("Exception when decrypting using algorithm %s", algorithm), e);
throw new DataException(String.format("Unable to decrypt file at path %s using algorithm %s: %s", this.filePath, algorithm, e.getMessage()));
}
} else {
// Assume it is unencrypted. This will be the case when we have built a custom path by combining