Gallus (RD): <roll> Aha, got it! Finally!
DM: You did it?
Gallus (RD): This'll put me up to seven successes, on attempt… 29.
DM: Ooh. My math might've been too precise…
Gallus (RD): Well, that "canceling each other out" thing didn't help!
DM: True. At any rate, congratulations! The layers of overlapping crystal have expanded just enough to create a hole that you can climb out of.
Gallus (RD): Hooooh, thank goodness!
DM: Outside is the catacomb passages, not too far from the entrance, in fact.
Gallus (RD): I climb out.
DM: You climb out!
Gallus (RD): Out of, uh, morbid curiosity, what would've happened if I'd… "failed?"
DM: Well, at 30 attempts, you would have run out of beams for a while until the light changed. At net six failures, it would've gotten so tight that you would hardly be able to move, and you would've had to wait for someone to dig you out from outside.
Gallus (RD): So I wasn't actually gonna be crushed?
DM: Well… you're playing a kid. I gotta pull my punches a little bit.
Generally, as a DM, when your players ask "So what would've happened if..." it's best not to answer. There are several good reasons for this - it helps you save that content for another time, and it keeps the mystery of the locations you build alive, keeping them interesting. But when it comes to potentially boundary-crossing stuff that inadvertently comes up in the session, full disclosure and reassurance is usually best.
I sort of disagree with Spud, being the player who usually asks "What would have happened if...?" Though this is because my group mostly plays Adventure Paths, not homemade content. I can see what he means about wanting to potentially use material more than once, but since that's pretty much never a concern in my group, I don't really hesitate to ask after the scene has run its course, and my DM doesn't mind telling the answer most of the time. The exception is when it's something that could impact future events, but that's rare.
I've generally given vague, fanciful answers that simply allude to a more difficult/painful time, though I try not to explicitly ever say they would die. I hate killing PCs solely on die rolls. I rather their actions determine that bit.
Me: "And you manage to slide under the collapsing stone door to the other side with a mere 2-3 inches to spare. Hat included." PC: "What would of happened if I got trapped in there?" Me: "You'd probably have to take the hidden passage less traveled, and the janitorial staff has been dead for some 50 years. Not that death stops some of them from collecting a paycheck."
Ah, that's true. I almost exclusively play homemade content, so I hadn't thought of that. One-shots are also another exception, if you're not planning on continuing in that world.
Our sunday gm has had a large homebrew content he's run for various groups. And while we've had one major and stupid death, we've been good about things, we also had the very big warning of with the final dungeon. You and allies can die here, odds are you wont be coming back if you do.
So any big warnings for things he's been fair, but otherwise let us do our own thing.
In a vein similar to Strat's comment, my Saturday GM has a setting he has ran many groups through (I'm technically on my second attempt through this same setting, as the first one washed out for players not caring too much, so the remaining ones voted for restart over recruiting half a party for in-progress). He's good at tweaking things enough that the party can still find some of the plot rails and do stuff with them, before the proverbial train of events hits where they're gonna hit... or we can do our own things, and stuff goes boom.