1 /*
<lambda>null2  * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 // This file was automatically generated from exception-handling.md by Knit tool. Do not edit.
6 package kotlinx.coroutines.guide.exampleSupervision03
7 
8 import kotlin.coroutines.*
9 import kotlinx.coroutines.*
10 
11 fun main() = runBlocking {
12     val handler = CoroutineExceptionHandler { _, exception ->
13         println("CoroutineExceptionHandler got $exception")
14     }
15     supervisorScope {
16         val child = launch(handler) {
17             println("The child throws an exception")
18             throw AssertionError()
19         }
20         println("The scope is completing")
21     }
22     println("The scope is completed")
23 }
24