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 {
306
306
println (" CoroutineExceptionHandler got $exception " )
307
307
}
308
308
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
310
310
launch {
311
311
launch {
312
312
throw IOException () // the original exception
313
313
}
314
314
}
315
315
}
316
316
try {
317
- inner .join()
317
+ innerJob .join()
318
318
} catch (e: CancellationException ) {
319
319
println (" Rethrowing CancellationException with original cause" )
320
320
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 {
14
14
println (" CoroutineExceptionHandler got $exception " )
15
15
}
16
16
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
18
18
launch {
19
19
launch {
20
20
throw IOException () // the original exception
21
21
}
22
22
}
23
23
}
24
24
try {
25
- inner .join()
25
+ innerJob .join()
26
26
} catch (e: CancellationException ) {
27
27
println (" Rethrowing CancellationException with original cause" )
28
28
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