This comes down to a intention situation. If, in the ref's opinion, the throwing player intended physical harm to the target player then the T (unsportsman like conduct)is justified. However, if the intention is to maintain posession of the ball then I have a "No Call"
An official's job is not an easy one by anymeans, and there is a lot of intentional/not-intentional evaluations that a ref must determine. However, you don't need to read minds on many of these situations. Usually an intentional foul is proceded by some verbal comments or increasingly rough play. A good ref can recognize this and often prevent it by calling a foul or two for rough play early thus preventing the situation from esclating to actual projectiles