Is there a way with `SupervisorJob` to restart a c...
# coroutines
a
Is there a way with
SupervisorJob
to restart a coroutine when it stops exceptionally?
Copy code
supervisorScope {
  launch {
    throw Exception()
  }
}
r
Like this, maybe?
Copy code
retry@ while(true) {
    try {
        throw Exception()
    } catch(e: Exception) {
        continue@retry
    }
    break@retry
}