One who swears not to pay his debts, it is a vain oath and he is liable for lashes when the Beit HaMikdash existed, and the oath does not take effect upon him, for one who swears to annul a mitzvah, the oath does not take effect, as is written in Yoreh Deah siman 239. And even if at the time he swore he was not indebted to any person, and it would be possible to say that the oath takes effect because he is not swearing to annul a mitzvah since his intention was that he should not borrow [Urim VeTummim], this is not so; for if so, he should have sworn not to borrow. But this language constitutes the annulment of a mitzvah, for if not so, in the case of one who swears not to make tzitzit, the oath would take effect because it is possible for him not to bring himself to the point of obligation by not wearing a four-cornered garment [Ketzot HaChoshen]; and one who swears not to recite Birkat HaMazon, the oath would take effect because it is possible for him not to eat bread; and one who swears not to return a stolen object, it would take effect because it is possible for him not to steal. Rather, it is certainly so that even in such a case it is called annulling a mitzvah. And also one cannot say that it should take effect through inclusion because since it takes effect regarding a star-worshipper it should take effect also regarding an Israelite [ibid.], for regarding doing harm to others, even through inclusion it does not take effect, as is written there in siman 236. However, if he swore not to sell his properties, if at the time he swore he had no debt upon him and afterwards he borrowed and has no money to pay, the oath takes effect, for when he swore it was not to annul a mitzvah. But if at the time he swore there were debts upon him, the oath does not take effect even if he had money then, for since he is a debtor, all his properties are liened by the Torah to the creditor and he is obligated to pay with everything he has, and how can his oath take effect upon the properties of others? But when he was not a debtor at the time of the oath, even if he swore not to sell his properties to pay a debt, the oath also takes effect, for it is within his power to pay with money if he borrows, and automatically the oath takes effect. And furthermore, certainly his intention was that he should not sell his properties even for the payment of a debt, and all the more so not for the payment of a debt, and if so, the oath takes effect through inclusion. And a case came before the Rosh, of blessed memory, regarding Reuven who swore not to sell of his own to pay any debt, and afterwards he swore to pay Shimon at a certain time, and when the time arrived he claims "I have no money and I have already sworn not to sell of my own to pay any debt." And the Rosh, of blessed memory, ruled that if Shimon's debt preceded the oath not to sell, the oath did not take effect, and they lash him if he does not want to pay. And if the oath preceded Shimon's debt and the first oath took effect, the second oath is found to be a vain oath, since he swore that he would pay at a certain time and he is obligated to fulfill his oath and sell even his properties and pay, yet he is unable because of the first oath, and therefore they lash him. And if out of the fear of the lashes he regrets it and finds an opening for the first oath, they shall permit it for him and he shall sell and fulfill the second oath. Thus far his words. And as for why he required an opening even though regret is sufficient, as is written in Yoreh Deah siman 228, perhaps he wanted to be stringent upon him, or he holds that regarding an oath regret is not enough [the Acharonim found difficulty with his words, but according to what I have written his words are clear; and delve into it].
הנשבע שלא לפרוע חובותיו הוי שבועת שוא וחייב מלקות כשהיה בהמ"ק קיים ואין השבועה חלה עליו דנשבע לבטל את המצוה לא חלה השבועה כמ"ש ביו"ד סי' רל"ט ואפילו אם בשעה שנשבע לא היה חייב לשום אדם והיה אפשר לומר דהשבועה חלה דלא הוי נשבע לבטל את המצוה דכוונתו שלא ילוה [או"ת] דאינו כן דא"כ היה לו לישבע שלא ללות אבל לשון זה הוי ביטול מצוה דאל"כ בנשבע שלא לעשות ציצית תחול השבועה מפני שאפשר לו שלא להביא עצמו לידי חיוב שלא ישא בגד מארבע כנפות [קצה"ח] והנשבע שלא יברך בהמ"ז תחול השבועה מפני שאפשר לו שלא יאכל לחם והנשבע שלא להשיב גזילה תחול מפני שאפשר לו שלא לגזול אלא וודאי דגם בכה"ג מקרי לבטל את המצוה וגם אין לומר שתחול בכולל כיון דחל על עובד כוכבים חלה גם על ישראל [שם] דהא להרע לאחרים גם בכולל אינו חל כמ"ש שם בסי' רל"ו אבל אם נשבע שלא למכור נכסיו אם בשעה שנשבע לא היה עליו שום חוב ואח"כ לוה ואין לו מעות לשלם חלה השבועה דהא כשנשבע לא היתה לבטל המצוה ואם בשעה שנשבע היו עליו חובות לא חלה השבועה אף שהיה לו מעות אז דכיון דהוא בע"ח משועבדים כל נכסיו מן התורה לבע"ח ומחוייב לשלם בכל אשר יש לו ואיך תחול שבועתו על נכסי אחרים אבל כשלא היה בע"ח בשעת שבועה אפילו נשבע שלא למכור נכסיו לפרוע חוב ג"כ חלה השבועה דהא ביכולתו לשלם במעות אם ילוה וממילא דחלה השבועה ועוד דוודאי כוונתו היה שלא ימכור נכסיו אפילו לפרעון חוב וכ"ש שלא לפרעון חוב וא"כ חלה השבועה בכולל ומעשה בא לפני הרא"ש ז"ל בראובן שנשבע שלא למכור משלו לפרוע שום חוב ואח"כ נשבע לפרוע לשמעון לזמן פלוני וכשהגיע הזמן טוען אין לי מעות וכבר נשבעתי שלא למכור משלי לפרוע שום חוב ופסק הרא"ש ז"ל דאם חובו של שמעון קדמה לשבועה שלא למכור לא חלה השבועה ומכין אותו אם אינו רוצה לפרוע ואם השבועה קדמה לחובו של שמעון וחלה השבועה הראשונה נמצאת שבועה שנייה שבועת שוא כיון שנשבע שיפרע לזמן פלוני ומחוייב לקיים שבועתו ולמכור אף נכסיו ולשלם ואין ביכולתו מפני שבועה הראשונה ולכן מכין אותו ואם מתוך אימת המלקות יתחרט וימצא פתח לשבועה ראשונה יתירוה לו וימכור ויקיים שבועה שנייה עכ"ל ומה שהצריך פתח אע"פ שדי בחרטה כמ"ש ביו"ד סי' רכ"ח אולי רצה להחמיר עליו או דס"ל דבשבועה לא סגי בחרטה [האחרונים נתקשו בדבריו ולפמ"ש דבריו ברורים ודו"ק]: