viewModelScope + CoroutineExceptionHandler { _ , _-> Timber.d("failure clickDebugButton ") } var count = 0 fun clickDebugButton() = scope.launch { count++ if (count % 2 == 0) { throw AssertionError("count%2 is 0") } Timber.d("success clickDebugButton") } ViewModel.kt Baby steps to improve architecture In Study Sapuri Android