My DS1 did this at that age.
We ended up limiting the amount of food that we put onto the tray, and adding more as he ate. When he was finishing/getting full and starting to grab the food to throw, I would take his hand in mine, take the food out of it, and say "oh, Thank You!!", acting like he was meaning to hand it to me. This became a bit of a game, but it was better than having food slung around.
HTH!