https://kotlinlang.org logo
#feed
Title
# feed
e

elizarov

07/14/2019, 8:36 AM
How do you handle exceptions in cold streams produced by Kotlin Flows? Be puzzled no more: https://medium.com/@elizarov/exceptions-in-kotlin-flows-b59643c940fb
⏸️ 15
z

zsmb

07/14/2019, 10:43 AM
@elizarov Really interesting read, your blog is quickly becoming the de facto coroutine documentation. FYI, there is a small typo in there:
collect { value -> pdateUI(value) }
1
e

elizarov

07/14/2019, 2:34 PM
Thanks. I really hope it is not replacing documentation. We are trying to be quite thorough in the docs.
d

dave08

07/14/2019, 2:37 PM
I'm wondering if it would be better to have
catch<IOException> { ... }
if someone needs to catch a specific exception instead of having to catch and rethrow the rest?
e

elizarov

07/14/2019, 2:40 PM
Unfortunately, we’ll have to give it another name, or “catch everything” will have to be written
catch<Throwable>
. We might improve this part of the language in the future, though.
👍🏼 3
a

Antanas A.

07/16/2019, 9:24 AM
Maybe could be implemented "Generic parameter defaults" as in typescript: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-3.html#generic-parameter-defaults
Copy code
class A<T = Throwable> { ... }
e

elizarov

07/16/2019, 11:07 AM