Generally, criticism should be constructive... it's difficult to give people helpful advice on how their conduct/behavior/actions are a fuck up if they don't recognize it as such. I always tried to view those situations as "coachable moments" for lack of a better term... first I'd make sure the employee understood how their actions weren't acceptable/resulted in an unfavorable outcome, and then we'd explore what they could have done better in that instance, and finally how to apply that going forward.
And, needless to say, stuff like that should be handled one on one or with an HR person present if it's necessary. Praise publicly, criticize privately.
...yelling is more fun, though.