ShadoCat's answer assumes that "transit time" is amlost infintely shorter than "entrance/exit time." Possibly so short that there is no disruption to the human brain while you enter/exit the hole. In this case, shutting down the hole cuts whatever is crossing in half. I'm fond of that idea, but let's look at fiction, since we don't really know what a wormhole does since we've never actually encountered one (it's still just a mathematical theory).
Let's assume that transit time is long enough that you fully enter the hole before exiting it. If it shuts down while you're entering/exiting the hole, you're back to ShadoCat's answer. If you are inside when the hole shuts down, you could (depending on how holes actually work) end up somewhere in outer space — assuming you can be thrown clear of a wormhole without consequence.
In that case, since wormholes are thought to behave as if space were a piece of paper, folded in half, and the wormhole connects to otherwise very distant points, then where you end up is (theoretically) parabolically deterministic, with the odds being that you'll end up more-or-less half-way through your journey if you tried the passage through "real space."
However, physics are rarely so neat and clean. If you're looking for a real-world probability: the traveling ship will instantly become background radiation.