It is narrated from Sayyiduna Abdullah bin Umar, may Allah be pleased with them both, that the Messenger of Allah, peace and blessings be upon him, said: Whoever takes an oath but makes an exception along with it, then he has the choice; if he wishes, he may enforce his oath, and if he wishes, he may not fulfill the requirement of the oath. This will not break his oath, or he said: There is no harm in it.
Hadith Referenceالفتح الربانی / كتاب الأيمان والنذور / 5314
Hadith Gradingمحدثین:صحیح
Hadith Takhrij«اسناده صحيح، أخرجه ابوداود: 3261، وابن ماجه: 2106، والنسائي: 7/25 ، (انظر مسند أحمد ترقيم الرسالة: 4510 ترقیم بيت الأفكار الدولية: 4510»
Brief Explanation
Benefits: … By exception is meant saying "in sha Allah" (if Allah, the Exalted, wills). These words clearly indicate that the one swearing the oath has not sworn a definitive oath; it is as if he wishes to say that if he is able to do this act, he will do it, otherwise it will be understood that Allah, the Exalted, did not will it, therefore this act could not be accomplished.