Exception not being caught in Coroutines
问题 I can't seem to get my error-handling done in coroutines. I've been reading lots of articles and the exception handling documentation but I can't seem to get it working. Here's my setup: My ViewModel launches the coroutine with it's scope class MyViewModel(private var myUseCase: MyUseCase) : ViewModel() { private val viewModelJob = Job() private val uiScope = CoroutineScope(Dispatchers.Main + viewModelJob) fun doSomething() { uiScope.launch { try { myUseCase() } catch (exception: Exception) {