DM Lies and Fudging rolls
To begin I want to cover the idea of fudging a roll. It may be considered controversial and all to many people, but it's both advised and explained in the 3.5e DMG on page 18:
DM Cheating and Player Perceptions
Terrible things can happen in the game because the dice just go awry. Everything might be going fine, when suddenly the players have a run of bad luck. A round later, half the party’s down for the count and the other half almost certainly can’t take on the foes that remain. If everyone dies, the campaign might very well end then and there, and that’s bad for every-one. Do you stand by and watch them get slaughtered, or do you “cheat” and have the foes run off, or fudge the die rolls so that the PCs still miraculously win in the end? There are really two issues at hand.
Do you cheat? The answer: The DM really can’t cheat. You’re the umpire, and what you say goes. As such, it’s certainly within your rights to sway things one way or another to keep people happy or keep things running smoothly. It’s no fun losing a long-term character who gets run over by a cart. A good rule of thumb is that a character shouldn’t die in a trivial way because of some fluke of the dice unless he or she was doing something really stupid at the time.However, you might not think it’s right or even fun unless you obey the same rules the players do. Sometimes the PCs get lucky and kill an NPC you had planned to have around for a long time.By the same token, sometimes things go against the PCs, and disaster may befall them. Both the DM and the players take the bad with the good. That’s a perfectly acceptable way to play, and if there’s a default method of DMing, that’s it.Just as important an issue, however, is whether the players realize that you bend the rules.
Hiding a Roll
I want to call special attention to this next half of the excerpt as it has bearing on the initial question.
Even if you decide that sometimes it’s okay to fudge a little to let the characters survive so the game can continue, don’t let the players in on this decision. It’s important to the game that they believe their characters are always in danger. If the players believe, consciously or subconsciously, that you’ll never let bad things happen to their characters, they’ll change the way they act. With no element of risk, victory will seem less sweet. And if thereafter something bad does happen to a character, that player may believe you’re out to get him if he feels you saved other players when their characters were in trouble.
This is a clear example as with many other places where the DM should hide the roll.
Another example is the skill Disable Device
Here is an excerpt from the beginning of the check explanation
Check: Your DM makes the Disable Device check for you secretly, so that you don’t necessarily know whether you’ve succeeded.
The reason for this is similar the to above rule on DM roll fudging. It's designed to both add and maintain suspense as well as keeping metagaming to a minimum.
Many players can have difficulties separating what they know vs what the character knows and forcing people to distinguish at all times between the two cam be both tiring and stressful. Some players simply can't. Not because they are bad players but because they don't have the experience to do so reliably. I myself prefer my DM keep things from my character doesn't know so I can't be tempted. At other times I feel like I've meta-gamed had I done something with detailed knowledge and I feel I might have chosen differently had I not something my character shouldn't know.
While there is no rule explicitly stating the DM should hide all rolls, there are many references throughout the dungeon Masters guide and the players handbook that tell the DM to hide a roll and lie to the player. Keep information secret and don't let this or that be revealed without a proper roll.
Many DMs hide their rolls entirely because this is easier than trying to remember what should be hidden and what shouldn't. (Though some are obvious. Yes, the player knows he failed to climb that wall. Especially when he hit the ground.) This also makes it easier to fudge a roll that might cause the party to wipe completely.