When the Reverend Dimmesdale calls upon Hester to name the man with whom she has sinned, he exhorts her not to be "silent from any mistaken pity and tenderness for him" because even if he were to be brought down from a high place, it would be "better than to hide a guilty heart through life." Yet, when Hester refuses to name the man, Reverend Dimmesdale seems relieved, and he even praises Hester.
In Chapter III of The Scarlet Letter, not only is Hester Prynne brought before the Puritan community to be questioned and scorned on the scaffold, but when she looks out, she sees a man she recognizes. As she does so, she convulsively presses the infant that she holds so forcefully that her baby cries out.
The man Hester has seen asks a stranger who the woman brought forth is. He is told her name and that she has dwelt in this community for two years as she waits for her husband to come from Amsterdam. Then, when the stranger asks the other man whose baby Hester holds, the man replies,
Of a truth, friend, that matter remaineth a riddle; and the Daniel who shall expound it is yet a-wanting.
The Puritan adds that, perhaps, the guilty one stands by watching this spectacle and he is unknown, and the Puritan thinks the man has forgotten that God sees him. Of course, the Puritan is unaware of the irony of the situation, as he is talking to the very man who is the husband of Hester Prynne. There is also irony in one of the stranger's responses because he actually speaks of himself and his clear intentions:
The learned man. . . should come himself to look into the mystery.
When the Reverend Mr. Wilson calls upon the young minister Dimmesdale to question Hester, Reverend Dimmesdale exhorts Hester to speak out and name her fellow-sinner because it is better that he be made known than that he "hide a guilty heart through life." Hester refuses, saying she will never name the man. When Dimmesdale hears this response, he lays his hand upon his heart and exclaims with a great exhaling of breath,
Wondrous strength and generosity of a woman's heart! She will not speak!
What is ironic is that the young minister compliments Hester for her courage and generosity in not naming the man with whom she has sinned when he has just exhorted her not to exercise any "tenderness" or "mistaken pity" for him. His remark that is complimentary to Hester seems to contradict what he has demanded of Hester and seemed to expect.
If you are in the beginning of the book, about chapter 3, this scene occurs with great irony. First of all, we know Dimmesdale to be a Reverend. Thus, he has a moral duty and obligation to the Puritan society to ensure that sin goes noticed. This effort of public mockery when great sin occurs was regular for Puritans and they believe it helped deter others from committing like crimes. What actually happens is that he moves through the ceremony of public mockery very quickly and the audience almost feels that he is letting her off the hook. Her punishment for the crime is not severe enough for them. Dimmsdale is acting more like a modern day minister who allows forgiveness (it is indeed a premise of the bible, but Puritans regularly overlooked it). It would have been ironic for a minister of that day and age to actually act that way.
What is more ironic is the identity of the father. Wait til you find that one out. There's a reason she's keeping such a big secret.