Translation
(11) The Chapters on Expiation
كتاب الكفارات
(6) Chapter: Uttering the exception when swearing
(6) باب الاِسْتِثْنَاءِ فِي الْيَمِينِ
Sunan Ibn Majah 2104 
It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
'Whoever swears an oath and says In sha' Allah, he will have made an exception."(2)
حَدَّثَنَا الْعَبَّاسُ بْنُ عَبْدِ الْعَظِيمِ الْعَنْبَرِيُّ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، أَنْبَأَنَا مَعْمَرٌ، عَنِ ابْنِ طَاوُسٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏ "‏ مَنْ حَلَفَ فَقَالَ إِنْ شَاءَ اللَّهُ فَلَهُ ثُنْيَاهُ ‏"‏ ‏.‏
Grade :  Sahih (Darussalam)
Reference : Sunan Ibn Majah 2104
In-book reference : Book 11, Hadith 15
English translation : Vol. 3, Book 11, Hadith 2104