Chapter 15 - `drankToday()` missing `try`

I believe there is a missing try in the drankToday() method shown in the “Reading single day data” section of Chaper 15, this would be just after the \\2 note (see screenshot).

Thanks for reporting this, you should probably post this on the book’s errata topic:

This is monitored by the book authors.

Hi @jrogel thanks for all your posts lately. They’re very timely as I’m actively working on updating the book. The try is not missing here. There’s nothing inside the closure that would throw, and so you don’t need to add try.

1 Like

Thanks! My compiler complained without it. I believe you thought so I may look at what I missed.