When is it your fault?

In teaching, when is it your fault? If one student has a horrible day, what could you have done to prevent that? If the entire class has a bad day, is it you or them? What if you thought the material was engaging but they were distracted? What if you KNOW it was engaging because your other section loced it and did really well? I don't know how I feel on whole. Part of me is personally invested. I'm sick, I had a bad day where I had to assign extra homework for an entire section, and it felt bad. Part of me wants to handle it in the business manner, passionate but easy-going, rarely letting work interfere with heart.