Randy Pausch said this quote

The person who failed often knows how to avoid future failures. The person who knows only success can be more oblivious to all the pitfalls.