grpc / grpc/grpc-java

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

Aperta
#4,864 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

Kotlin does not observe checked exceptions. https://kotlinlang.org/docs/reference/exceptions.html#checked-exceptions . It [sounds like](https://github.com/grpc/grpc-java/issues/2668#issuecomment-422737424) 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.