It depends solely on the situation. I only abandon a moral code if another one seems more justified and practical. For example, say a man who is desperately poor and has a very sick child at home who needs medicine, but cannot afford to buy what his child urgently needs, breaks into a pharmacy and steals it. If I witnessed that, my first moral code would be telling me to call the cops and have him arrested. But if I knew he was desperately poor and had a dying child at home, and that that was the only way he could get the medicine, I would abandon that moral code and pretend I “didn’t see him break into the drugstore and steal the medicine.” For me, letting the poor man steal the medicine for his gravely ill child is the greater morality.