Similarly, Fr. Sertillanges, O.P., said in his The Intellectual Life (p. 163-164):
St. Thomas, whose idea I base myself on here, concludes from these observations that we owe gratitude even to those who have thus tested us, if because of them and their action we have made any kind of progress. Directly, we owe everything to truth alone, but indirectly we owe to those who are in error the mental development that, thanks to them, Providence provides for us. [In II. Metaphys. lect. I.]
Think what the Church owes to heresies and philosophy to its great conflicts of opinion. If it had not been for Arius, Eutyches, Nestorius, Pelagius, Luther, Catholic dogma would not have been constituted. If Kant had not shaken the foundations of human knowledge, criteriology would still be in its childhood; and if Renan had not written on Christian origins, the Catholic clergy would be far from having the historical and exegetical formation they now possess.
What is true collectively is true individually. We must learn right thinking principally by contact with the wise; but folly itself contains a lesson; he who escapes its contagion draws strength from it. "He who stumbles without falling makes a bigger step forward."