Skip to content
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

core: Catch uncaught exceptions in ServerImpl #6165

Merged
merged 2 commits into from
Jun 16, 2020

Conversation

anarsultanov
Copy link
Contributor

@anarsultanov anarsultanov commented Sep 19, 2019

Fixes #6162 A cleanup regarding #6162

@dapengzhang0 dapengzhang0 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Sep 19, 2019
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Sep 19, 2019
@dapengzhang0
Copy link
Member

Ping @ejona86

@ejona86
Copy link
Member

ejona86 commented Sep 24, 2019

The discussion for whether we are going to do this is still ongoing in #6162

@ejona86
Copy link
Member

ejona86 commented Jun 16, 2020

So I took another look at this. I'm really surprised that Java 8 with source=7 has the type inferencing to notice that "no checked exceptions can be thrown" within the block, so even though we throw Throwable it doesn't treat it as Throwable (throw t and throw (Throwable) t behave differently). I knew that was a thing with later Java versions, but I got mixed up and thought it wasn't available to us. I guess the last time I looked at it we were supporting source=6?

Since all the tests pass, this looks like a general cleanup, and so would be good to merge. #6162 is still about whether we'll go out of our way to handle checked-but-not-checked exceptions, but any place Java isn't a PITA when re-throwing and we can have one code path, that would be good.

@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 16, 2020
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 16, 2020
Copy link
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving from a code-cleanup standpoint.

Copy link
Member

@dapengzhang0 dapengzhang0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ejona86 ejona86 merged commit 1a42c8a into grpc:master Jun 16, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught exceptions in server
4 participants