bbejeck commented on code in PR #17817:
URL: https://github.com/apache/kafka/pull/17817#discussion_r1842782211
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorNode.java:
##########
@@ -203,7 +203,9 @@ public void process(final Record<KIn, VIn> record) {
} catch (final FailedProcessingException | TaskCorruptedException |
TaskMigratedException e) {
// Rethrow exceptions that should not be handled here
throw e;
- } catch (final RuntimeException processingException) {
+ } catch (final Exception processingException) {
+ // while Java distinguishes checked vs unchecked exceptions, other
languages like
+ // Scala or Kotlin do no, and thus we need to `Exception` to work
well with those languages
Review Comment:
nit `do no` -> `do not` here and below
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java:
##########
@@ -883,18 +881,6 @@ public void recordProcessTimeRatioAndBufferSize(final long
allTaskProcessMs, fin
processTimeMs = 0L;
}
- private String getStacktraceString(final Throwable e) {
- String stacktrace = null;
- try (final StringWriter stringWriter = new StringWriter();
- final PrintWriter printWriter = new PrintWriter(stringWriter)) {
- e.printStackTrace(printWriter);
- stacktrace = stringWriter.toString();
- } catch (final IOException ioe) {
- log.error("Encountered error extracting stacktrace from this
exception", ioe);
- }
- return stacktrace;
- }
-
Review Comment:
Why remove this?
--
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]