You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/09/24 09:17:19 UTC

[GitHub] [kafka] tombentley commented on a change in pull request #11349: MINOR: Fix use of ConfigException in AbstractConfig class

tombentley commented on a change in pull request #11349:
URL: https://github.com/apache/kafka/pull/11349#discussion_r715452885



##########
File path: clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java
##########
@@ -577,13 +577,17 @@ public void logUnused() {
                 configProviderInstances.put(entry.getKey(), provider);
             } catch (ClassNotFoundException e) {
                 log.error("ClassNotFoundException exception occurred: " + entry.getValue());
-                throw new ConfigException("Invalid config:" + entry.getValue() + " ClassNotFoundException exception occurred", e);
+                throw new ConfigException(providerClassProperty(entry.getKey()), entry.getValue(), "ClassNotFoundException exception occurred");

Review comment:
       What if the class that's not found isn't the config provider but some dependency of it? Because the CNFE message isn't logged nor passed to the `ConfigException` this info would be lost.




-- 
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: jira-unsubscribe@kafka.apache.org

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