Can a judge give a judgement in an angry mood? Sahih al-Bukhari 7160

Arabic hadith text
حَدَّثَنَا مُحَمَّدُ بْنُ أَبِي يَعْقُوبَ الْكِرْمَانِيُّ، حَدَّثَنَا حَسَّانُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا يُونُسُ، قَالَ مُحَمَّدٌ أَخْبَرَنِي سَالِمٌ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، أَخْبَرَهُ أَنَّهُ، طَلَّقَ امْرَأَتَهُ وَهْىَ حَائِضٌ، فَذَكَرَ عُمَرُ لِلنَّبِيِّ صلى الله عليه وسلم، فَتَغَيَّظَ فِيهِ رَسُولُ اللَّهِ صلى الله عليه وسلم ثُمَّ قَالَ ‏"‏لِيُرَاجِعْهَا، ثُمَّ لْيُمْسِكْهَا حَتَّى تَطْهُرَ، ثُمَّ تَحِيضَ فَتَطْهُرَ، فَإِنْ بَدَا لَهُ أَنْ يُطَلِّقَهَا فَلْيُطَلِّقْهَا ‏"
Translation
Narrated `Abdullah bin `Umar

That he had divorced his wife during her menses. `Umar mentioned that to the Prophet. Allah's Apostle became angry and said, "He must take her back (his wife) and keep her with him till she becomes clean from her menses and then to wait till she gets her next period and becomes clean again from it and only then, if he wants to divorce her, he may do so."