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/10/18 19:09:27 UTC

[GitHub] [kafka] vvcephei commented on a change in pull request #11405: KAFKA-12648: Wrap all exceptions thrown to handler as StreamsException & add TaskId field

vvcephei commented on a change in pull request #11405:
URL: https://github.com/apache/kafka/pull/11405#discussion_r731235333



##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/AbstractTask.java
##########
@@ -168,11 +167,15 @@ public void maybeInitTaskTimeoutOrThrow(final long currentWallClockMs,
                 StreamsConfig.TASK_TIMEOUT_MS_CONFIG
             );
 
+            final StreamsException exception;
             if (cause != null) {
-                throw new TimeoutException(errorMessage, cause);
+                exception = new StreamsException(errorMessage, cause);
             } else {
-                throw new TimeoutException(errorMessage);
+                exception = new StreamsException(errorMessage);

Review comment:
       Should we change the semantics of the exception here?
   
   I think this might be more like the IllegalStateException, which you wrapped below to preserve the information about the type of exception.




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