Actually, having to look it up, there are several caveats. One, if it is literally impossible for you to do it, it doesn't qualify. So if you vowed to kill a person and they're already dead, then it doesn't count. By that same measure, I imagine, if you vowed to protect someone and they're killed without you possibly being able to know about it, it also doesn't count.
Second, he vows to protect him to the best of his ability. Which means that, so long as he did everything he could, he's fine. The last part is executing his order... Well, that's tough luck