android / codelab-kotlin-coroutines

Kotlin Coroutines codelab
Apache License 2.0
552 stars 268 forks source link

Why propagate the use of Exceptions? #88

Open Frank1234 opened 4 years ago

Frank1234 commented 4 years ago

Could you please explain why the codelab's code relies so heavily on exceptions and exception handling? Why are exceptions thrown in normal code flows? Why isn't an alternative used, like sealed response classes or something similar?

It feels to me that you are propagating a bad practice. The thrown exceptions are not even documented in the method comments.