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 2020/07/01 16:41:54 UTC

[GitHub] [iceberg] massdosage commented on a change in pull request #1154: Replaced RuntimeIOException with Java 8 UncheckedIOException

massdosage commented on a change in pull request #1154:
URL: https://github.com/apache/iceberg/pull/1154#discussion_r448488064



##########
File path: core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java
##########
@@ -277,7 +277,7 @@ private static void deleteFiles(FileIO io, Set<ManifestFile> allManifests) {
               }
             }
           } catch (IOException e) {
-            throw new RuntimeIOException(e, "Failed to read manifest file: " + manifest.path());
+            throw new UncheckedIOException("Failed to read manifest file: " + manifest.path(), e);

Review comment:
       So would we just make the class extend `UncheckedIOException` and leave everything throwing it as it is now? I personally don't like the way in the arguments it puts the exception first and the message second, I find this confusing as most other Java Exceptions do it the other way around. There is also the "magic" it performs to `String.format` things which again was a bit of a surprise and forced me to look into the internals which I rarely have to do with other Exception types I've used.
   
   You guys know a lot more about how this is used but since its an Unchecked Exception is API compatibility such an issue? Perhaps there is a defined set of classes where it needs to be kept but can be removed everywhere else?




----------------------------------------------------------------
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.

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