Possibly too pedantic, but I’d be tempted to remind the reader that they can certainly put the try/catch inside the launch
and it will work. Less obv, they can put it just outside the coroutineScope
and it will also work, but it will cancel the sibling jobs if they’re still running.
Sounds like a good suggestion, but I can’t spot which code example you’re referring to! You mentioned page 43, but in my PDF copy, I don’t think I’m seeing any code examples with launch
or try
–catch
on or near that page. Could you give me the full file name and path, or the name of the chapter and section? Thanks!
Yeah, sorry, I meant to paste “coffee/v4/src/main/kotlin/com/example/coffee/CoffeeApplication.kt” as the context.
Thanks—found it. I reread this section and found quite a few opportunities to make it better. I’m going to include both your suggestions. I also found some repetitive bits to cut out, and I think the changes improve the way the whole section flows with the rest of the chapter. It should be a lot better in the next Beta release—thank you for drawing my attention to it!