Whatever one thinks of its virtues or vices as an additive, STP is a good mnemonic. Safe place to stop, Turn off the key, and Pray you haven't spun a bearing or seized or galled the heck out of anything in the time it took to do even that.
Also STay off the Power, assuming you can get through traffic and come to a safe place without it. (Safety first -- live to buy another engine.)
And you definitely shouldn't try driving off unless you know what the problem is and can be positive that you've solved it.
It probably helps to have an engine that is more robust in these regards (good luck figuring out which ones those are, besieds which, prioritizing the ability to survive a low-probability failure is kind of a goofy way to select a car). Definitely helps to have quality oil with a lot of shear strength at the molecular level and a good ability to withstand temperature and a tendency to stick tenaciously to metal.
Cheers,
--Joe