Man up and admit you messed up before things get worse. You definitely walk a fine line between giving up too early and giving up too late. Either way, it’s imperative that you anticipate failure. Bring it up as soon as things start turning sour. Addressing your anticipation with others will hurt you less than failure itself; if anything, it may help you minimize casualties or possibly keep the train on the tracks. Identifying and debriefing failure is the key to learning from mistakes and sharing your education with others.