Nafi' reports from Ibn Umar (may Allah be pleased with them both): When a man swears an oath and makes an exception, saying "In sha' Allah" (if Allah wills), joining the exception to his words, and then does what he swore about, he is not in breach of his oath.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19924
Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) said that the Prophet (peace and blessings be upon him) said: "Whoever swears an oath and right after it says 'In sha' Allah' (if Allah wills), and then breaks the oath he swore, then 'In sha' Allah' is the expiation of his oath."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19925
Sayyiduna Ibn Umar (may Allah be pleased with them both) said: "Every exception that is joined to the oath means no breach for the one who makes it; but if the exception is not joined, then he is in breach."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19926