AaronOfBarbaria
Adventurer
To be fair, in that situation the DM is presented with a number of options as to what to do, a couple of which are:To be fair, the DM may roll expecting to use the result then realise the actual result (often "too remote a chance to consider actually occurring") conflicts with his desires and so he substitutes a different result on the fly.
A) Say something along the lines of "Sorry everyone, disregard that roll, the die just pointed out to me that I [insert which mistake it actually was that lead to this; forgetting/being unaware a particular result was possible at all (like this one time I was running DCC and crit with a spell against the party only to find out that the spell was capable of preventing the entire party and everyone on their ship from having ever existed, no save), or putting a result that could conditionally become undesirable on your list of things that might happen according to random roll] and that's not at all cool, right? How about [insert different result here] instead?
B) Hope the players all miss the story told on your face when seeing the die result, registering what that result means as undesired, and then telling the players a result that is delivered with tone, body language, and facial expression that don't match, while you change the result without their input (and hopefully without their knowledge, especially since even the rule-book that says you can do this says not to let anyone know, ever) and without actually giving yourself an opportunity to learn from the mistake you made because you likely won't even remember this moment as being a mistake.