I do not know it except from the Prophet ﷺ, who said, "Whoever swears an oath and makes an exception has a choice. If he wishes, he may carry out his oath, and if he wishes, he may withdraw without breaking it," or he said, "without sin."
حدثنا إسماعيل حدثنا أيوب عن نافع
لا أعلمه إلا عن النبي ﷺ قال من حلف فاستثنى فهو بالخيار إن شاء أن يمضي على يمينه وإن شاء أن يرجع غير حنث أو قال غير حرج