rdblue commented on code in PR #16611:
URL: https://github.com/apache/iceberg/pull/16611#discussion_r3461109931


##########
core/src/main/java/org/apache/iceberg/formats/FormatModelRegistry.java:
##########
@@ -205,12 +205,13 @@ private static void registerSupportedFormats() {
     for (String classToRegister : CLASSES_TO_REGISTER) {
       try {
         
DynMethods.builder("register").impl(classToRegister).buildStaticChecked().invoke();
-      } catch (NoSuchMethodException e) {
+      } catch (NoSuchMethodException | NoClassDefFoundError | 
ExceptionInInitializerError e) {
         // failing to register a factory is normal and does not require a 
stack trace
+        String message = e.getCause() != null ? e.getCause().getMessage() : 
e.getMessage();
         LOG.info(
             "Unable to call register for ({}). Check for missing jars on the 
classpath: {}",
             classToRegister,
-            e.getMessage());
+            message);

Review Comment:
   I agree. We should handle these errors, but distinguish between the cases.



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