Sunan an-Nasa'i, Volume 4, Book 35, Hadith 3860 (DarusSalam) ⓘ
It was narrated that Ibn 'Umar said: "The Messenger of Allah said: 'Whoever swears an oath and says: If Allah wills, then he has made an exception.'"
أَخْبَرَنَا مُحَمَّدُ بْنُ مَنْصُورٍ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ حَلَفَ فَقَالَ إِنْ شَاءَ اللَّهُ فَقَدِ اسْتَثْنَى " .
also referenced under: Hadith 3829 (Reference) & Book 35, Hadith 69 (In-Book)