It’s not easy, but the best investors learn from their errors.