-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-17994: Checked exceptions are not handled #17817
base: trunk
Are you sure you want to change the base?
Conversation
While Java distinguished between checked vs unchecked exception, other JVM languages do not. Thus, user code might still throw a checked exception even if no checked exception is declared on the implemented interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overalll lgtm, just have a couple of comments
} | ||
return stacktrace; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused method. side cleanup. (Sorry, should have called it out.)
} 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit do no
-> do not
here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
While Java distinguished between checked vs unchecked exception, other JVM languages do not. Thus, user code might still throw a checked exception even if no checked exception is declared on the implemented interface.
Should be cherry-picked to 3.9 branch.