The 3rd Book, updateLabel()?

I noticed that you made the lasttimeerror to be nil if you get the correct location at the end, but not the other way around.

Will there be a case that, you get the correct location at first, and then you encounter an error. If that is the case, the location still stores the value last time we put in. Then “if let location = location” in updatelabel will still be true, and we won’t even get to the part where the error gets handled in updateLabel().

I guess it depends on how you want the app to react to errors. If you get a valid location and then an error, what should the app do? Right now, the app ignores that error and keeps using the last valid location. But that’s a decision on the part of the designer of the app. For another app that uses locations that may not be the “correct” thing to do.