mjsax commented on code in PR #16300:
URL: https://github.com/apache/kafka/pull/16300#discussion_r1697965185
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java:
##########
@@ -917,8 +922,34 @@ public void punctuate(final ProcessorNode<?, ?, ?, ?> node,
maybeMeasureLatency(() -> node.punctuate(timestamp, punctuator),
time, punctuateLatencySensor);
} catch (final StreamsException e) {
throw e;
- } catch (final RuntimeException e) {
- throw new StreamsException(String.format("%sException caught while
punctuating processor '%s'", logPrefix, node.name()), e);
+ } catch (final Exception e) {
+ final ErrorHandlerContext errorHandlerContext = new
DefaultErrorHandlerContext(
+ null,
+ recordContext.topic(),
+ recordContext.partition(),
+ recordContext.offset(),
+ recordContext.headers(),
+ null,
+ null
+ );
+
+ final ProcessingExceptionHandler.ProcessingHandlerResponse
response;
+
+ try {
+ response =
processingExceptionHandler.handle(errorHandlerContext, null, e);
+ } catch (final Exception fatalUserException) {
Review Comment:
Same here. Why not `RuntimeException` -- given that no checked exception is
declared for the `handler(...)` method, it's not possible to get a `Exception`
here.
--
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]