“But while he thought on these things, behold, the angel of the Lord appeared unto him in a dream, saying, Joseph, thou son of David, fear not to take unto thee Mary thy wife: for that which is conceived in her is of the Holy Ghost.”
Matthew 1:20 — Greek Interlinear
Church Fathers on Matthew 1:20
Because Joseph was minded, as has been said, to put Mary away privily, which if he had done, there would have been few who would not rather have thought her a harlot than a virgin, therefore this purpose of Joseph was changed by Divine revelation, whence it is said, 'While he thought on these things.'
In this is to be noted the wise soul that desires to undertake nothing rashly.
Also observe the mercifulness of Joseph, that he imparted his suspicions to none, not even to her whom he suspected, but kept them within himself.