It depends on what you're trying to do, working in bad conditions/under pressure is good for training but bad for actually getting things done. Ironically this seems to mean that you should work harder to have good conditions when you're under more time pressure/in a worse situation overall.
When I originally wrote "When to scream 'Error!'", I was mainly thinking of bad patterns of thought or bad problem-solving strategies as being the source of the error. Since then, I've come to realize that my own most common source of stupidity is because I've neglected some comfort. I may be hungry without consciously paying attention to it, dehydrated because I've been living on coffee for too long, or simply have a headache and need to take an Ibuprofen -- as a result, I don't think well, get irritated at the fact that I'm not thinking well, and generally begin a death spiral if I don't realize why.
In hindsight, it feels obvious that I should take care of the physiological needs that I can because they're likely preventing me from thinking straight. However, I've failed to do this on numerous occasions and so thought it worth mentioning.
In summary: Whenever you're screaming "Error", I suggest you stop and figure out whether you're hungry, thirsty, tired, or hurting before trying to find a problem in your thinking itself, especially if you're not usually good at noticing such things.