scottiedog45
09/28/2019, 4:58 PMfun ViewModel.launchWithErrorHandling(block: suspend CoroutineScope.() -> Unit) : Job {
return viewModelScope.launch {
try {
block()
} catch (e: HttpException) {
println("errRRRor")
} catch (e: IOException) {
println("IO NOOOO")
}
}
}