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

Catch Exception even if it isn't thrown, for Kotlin #4864

Open
ejona86 opened this issue Sep 19, 2018 · 2 comments
Open

Catch Exception even if it isn't thrown, for Kotlin #4864

ejona86 opened this issue Sep 19, 2018 · 2 comments
Milestone

Comments

@ejona86
Copy link
Member

ejona86 commented Sep 19, 2018

Kotlin does not observe checked exceptions. https://kotlinlang.org/docs/reference/exceptions.html#checked-exceptions . It sounds like that that means that even things like Runnable can throw checked exceptions.

Lots of code will be broken in such an environment, including lots of Guava. But for improved Kotlin handling we could consider making sure to handle Exception catching places we have RuntimeException catching if the application may have been called.

It's probably a good idea to confirm the behavior and discuss this problem with Guava folks and come to a unified agreement.

CC @m7onov, @zpencer

@marcoferrer
Copy link
Contributor

I'm interested in the result of this discussion.

We use grpc with Kotlin in production and although we have error handling explicitly enforced for our ServiceImpls, we do want to make sure our interceptors follow any convention we expect to be implemented.

One case is our server tracing instrumentation with datadog, which will need to be updated so that it correctly reports errors. eg. TracingServerInterceptor

@m7onov
Copy link

m7onov commented Feb 14, 2021

Looks like fixed in this commit 1a42c8a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants