File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
kotlinx-coroutines-core/jvm/test/guide Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -306,15 +306,15 @@ fun main() = runBlocking {
306306 println (" CoroutineExceptionHandler got $exception " )
307307 }
308308 val job = GlobalScope .launch(handler) {
309- val inner = launch { // all this stack of coroutines will get cancelled
309+ val innerJob = launch { // all this stack of coroutines will get cancelled
310310 launch {
311311 launch {
312312 throw IOException () // the original exception
313313 }
314314 }
315315 }
316316 try {
317- inner .join()
317+ innerJob .join()
318318 } catch (e: CancellationException ) {
319319 println (" Rethrowing CancellationException with original cause" )
320320 throw e // cancellation exception is rethrown, yet the original IOException gets to the handler
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ fun main() = runBlocking {
1414 println (" CoroutineExceptionHandler got $exception " )
1515 }
1616 val job = GlobalScope .launch(handler) {
17- val inner = launch { // all this stack of coroutines will get cancelled
17+ val innerJob = launch { // all this stack of coroutines will get cancelled
1818 launch {
1919 launch {
2020 throw IOException () // the original exception
2121 }
2222 }
2323 }
2424 try {
25- inner .join()
25+ innerJob .join()
2626 } catch (e: CancellationException ) {
2727 println (" Rethrowing CancellationException with original cause" )
2828 throw e // cancellation exception is rethrown, yet the original IOException gets to the handler
You can’t perform that action at this time.
0 commit comments