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

Evgeniy Zaharov

06/20/2018, 3:14 PM
hi. is it normal that in code:
Copy code
fun test() {
        try {
            method()
        } catch (e: Throwable) {
            println("method-catch")
        }
    }

    private fun method() = runBlocking {
        try {
            val job = launch {
                try {
                    repeat(5) {
                        if (it == 3) throw RuntimeException("opps")
                        println(123)
                        delay(100)
                    }
                } catch (e: Throwable) {
                    println("inner-catch")
                    throw e
                }
            }

            job.join()
        } catch (e: Throwable) {
            println("out-catch")
            throw e
        }
    }
i see only this:
Copy code
123
123
123
inner-catch
and there is no
method-catch
?