danielcweeks commented on code in PR #16611:
URL: https://github.com/apache/iceberg/pull/16611#discussion_r3460927821
##########
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:
It's not clear to me that we can still see which underlying cause triggered
the failure. It's important to know whether you have a class mismatch or
you're missing a class.
--
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]