Hazrat Ali (A) was on pilgrimage to Mecca when a man who accused of adultery was produced before him. The Judgment by Hazrat Omar (RA) who was a caliph then, was to stone the man to death. On hearing of the above Judgment delivered by Hazrat Omar (RA) in the case in question, Hazrat Ali (A) said to him;
“The total punishment fixed by the religious law in such a case is whipping and not stoning to death, because the wife of the man involved in it is away from him.”
Hearing this decision by Hazrat Ali (A), Hazrat Omar (RA) said, “May not Allah allow me to survive the time when I am in a difficulty and Abul Hasan is not there to solve it.”
(Manaqib Khawarzami through Bihar vol. 9, p. 478; Manaqib Shehr Aashob vol. 2, p. 183).