The idea is that it partially describes the following foreach - it belongs to it because one of the possible outcomes is that we get an error.

I must say I think it belongs more to the foreach than to $user, don't you think?