steveloughran commented on code in PR #6884:
URL: https://github.com/apache/hadoop/pull/6884#discussion_r1832646102


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/EncryptionS3ClientFactory.java:
##########
@@ -246,8 +255,13 @@ private S3AsyncClient 
createS3AsyncEncryptionClient(S3ClientCreationParameters p
       
s3EncryptionAsyncClientBuilder.cryptoMaterialsManager(kmsCryptoMaterialsManager);
       break;
     case CUSTOM:
-      Keyring keyring = 
getKeyringProvider(cseMaterials.getCustomKeyringClassName(),
-          cseMaterials.getConf());
+      Keyring keyring;
+      try {
+        keyring =
+            getKeyringProvider(cseMaterials.getCustomKeyringClassName(), 
cseMaterials.getConf());
+      } catch (RuntimeException e) {
+        throw new IOException("Failed to instantiate a custom keyring 
provider", e);

Review Comment:
   can you include the error text of e in the new IOE; it's really easy to lose 
the base exception in log stack chains with deep wrapping/rewrapping.
   
   ```
   IOException("Failed to instantiate a custom keyring provider: " + e, e)
   ```
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to