Technically he passed the ball to the goalie, so catching it with his hands was an illegal move and should have resulted in a penalty kick. But it did prevent the goal at that moment so... huzzah
Actually, he is in the box. There are two boxes, the goalie box and penalty box. The goalie may touch the ball in the goalie box, but if a player other than the goalie touches it in the penalty box, it results in a direct penalty kick from the closer line.
The large box with an arc toward the front is the goal box. The goalie may pick up the ball in this box. There is a smaller box that is about as wide as the goal, which is used for goal kicks when the opposing team kicks the ball out of bounds on this end. If a defending player touches the ball with a hand within either of these boxes, it is a direct penalty kick.
but it was gym class
so I rolled my eyes