C0urante commented on PR #14721:
URL: https://github.com/apache/kafka/pull/14721#issuecomment-1804080696

   IMO it'd be cleaner if we could keep the same exception type. We could 
concatenate the existing messages with the cause's message (if non-null); for 
example:
   ```java
   String message = "A client SSLEngine created with the provided settings "
       + "can't connect to a server SSLEngine created with those settings."
   if (e.getMessage() != null)
       message += ": " + e.getMessage();
   throw new ConfigException(message);
   ```
   
   A follow-up item (that requires a KIP but hopefully shouldn't be too 
controversial) could be to add a new `ConfigException(String message, Throwable 
cause)` constructor, which would allow us to preserve the complete stack trace 
of the cause instead of just the message.


-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to