Sometimes the solution is 'not to do that bad thing' and quite often there's no going back from that.
Obviously there are life critical systems where this shouldn't even be possible, but hopefully there are tests and trials that filter broken products/services before life is put in harm's way.