Barack Obama actually said...
The real test is not whether you avoid failure, but whether you let it harden or shame you into inaction, or whether you learn from it; whether you choose to persevere.
Context
Obama speaking on the importance of perseverance in the face of failure.
05/18/2007