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

miqbaldc

09/30/2021, 3:35 AM
TIL: How to write Exception in Kotlin (opinionated) 1. Kotlin recommends to use exception catch operator e.g:
Flow<T>.catch
,
runCatching {}
etc 2. Dual-use API introduced for convenient e.g:
getOrNull
,
getOrDefault
etc 3. Use preconditions and compile check when writing public API/method https://medium.com/sampingan-tech/kotlin-getting-to-knows-with-exceptions-564f8b2bc3c
5 Views