You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2022/05/17 08:38:00 UTC
[jira] [Created] (KAFKA-13908) RuntimeException will be thrown in BrokerServer.startup, not the cause of exception
Luke Chen created KAFKA-13908:
---------------------------------
Summary: RuntimeException will be thrown in BrokerServer.startup, not the cause of exception
Key: KAFKA-13908
URL: https://issues.apache.org/jira/browse/KAFKA-13908
Project: Kafka
Issue Type: Improvement
Reporter: Luke Chen
Before [#11969|https://github.com/apache/kafka/pull/11969], We will throw an {{ExecutionException(KafkaStorageException)}} in {{{}BrokerServer.startup{}}}, and we'll catch the exception and rethrow the cause by:
{code:java}
throw if (e.isInstanceOf[ExecutionException]) e.getCause else e{code}
After [#11969|https://github.com/apache/kafka/pull/11969], We will throw a {{RuntimeException(ExecutionException(KafkaStorageException)). But the catch logic didn't change. That means, if the exception is RuntimeException, we won't throw only the cause, but all the exception chains. }}
We should update it and add tests for it.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)