Does it depend on how badly it goes? Is how you react creating a BIG PROBLEM? (for you, others or your dog?)
Does your reaction depend on how important the thing is? By that I mean if a rule is wait until a door is open before going through it and another rule is don't counter surf - do you get more upset over whichever rule matters more to you? Or is a rule a rule?
Is an incident treated the same way no matter who is around? If dogs are not supposed to jump up on visitors is the reaction stronger if they jump on some people?
Is your approach positive or punative?
Yelling is ineffective and it also makes me feel horrible. I don't think I'm alone in that. Not yelling has a really positive impact both for you and for those around you. (Kids, spouse, dogs, whoever!)
Mistakes happen, they are a learning opportunity. Sounds so easy. So hard to truly internalize tho.
There is a woman at the barn I ride at - quite a nice rider generally - who has a terrible temper. A temper bad enough I won't let her help me bring horses in. If one of the youngsters stepped on her, or stopped and stared at something I honestly don't know what she'd do. I do know she loses any semblance of self control when things don't go according to plan. It's quite sad as she's quite a lovely person otherwise. You have all seen the agility dogs who make a mistake and drop and cringe; perhaps leaving the field or otherwise taking action (that usually doesn't include agility). I often wonder why things going wrong upsets them so badly. I don't see handlers melt down angrily but it seems that the dogs are sensing things going wrong sometimes... or perhaps they just worry things might go wrong?
Tension, anywhere in the team, is not constructive or helpful. Challenges are one thing and pushing your team can be a huge rush but it is important to work through what you will do if things don't go according to plan. (And yes I truly do believe visualizing and expecting success is a worthwhile component to the mental game of sport!) Figure out how you are going to deal with things before you have to. That way it's much harder to provoke a reaction that isn't intentional.
One of the nicest things I've heard lately was a comment on a dressage test about what a pleasure it was to watch Nelly and I as we were a happy team. Nice eh? I'm still glowing!
And do keep in mind the errors aren't personal. Your dog isn't trying to be BAD, or to get you, or to make you crazy - honestly! Once I really understood and internalized this my frustration level dropped.