https://kotlinlang.org logo
e

ean5533

10/13/2016, 8:34 PM
You need the main thread to notice the error and do something about it (like throw its own exception). Using `CompletableFuture`s (no couroutines) it would look something like:
Copy code
fun test() {
    doSomething().get() // get will throw if the future completed exceptionally
}