You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/07 14:12:31 UTC

[GitHub] [iceberg] dimas-b commented on a diff in pull request #5222: Don't throw from finally block

dimas-b commented on code in PR #5222:
URL: https://github.com/apache/iceberg/pull/5222#discussion_r915923854


##########
aws/src/main/java/org/apache/iceberg/aws/dynamodb/DynamoDbTableOperations.java:
##########
@@ -135,8 +135,7 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) {
           io().deleteFile(newMetadataLocation);
         }
       } catch (RuntimeException e) {
-        LOG.error("Fail to cleanup metadata file at {}", newMetadataLocation, e);
-        throw e;
+        LOG.error("Failed to cleanup metadata file at {}", newMetadataLocation, e);

Review Comment:
   Would you consider adding `e` as a "suppressed" exception to any previous exception?
   
   It's a bit more refactoring, but often having more information in the thrown exception is more useful than logs.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org