Skip to content

Instantly share code, notes, and snippets.

@jeziellago
Created August 13, 2018 00:35
Show Gist options
  • Save jeziellago/9bd4a8cd84dae7e64da579a3921af042 to your computer and use it in GitHub Desktop.
Save jeziellago/9bd4a8cd84dae7e64da579a3921af042 to your computer and use it in GitHub Desktop.
fun load() = launch(UI) {
try {
val result = withContext(CommonPool) { // work! }
...
} catch (e: IOException) { // exception que pode gerar
// exception here!
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment