Yet sometimes vows are made about immoderate vigils or fasts which tend to injure the person: and sometimes vows are about indifferent matters and such as are useful to no purpose. Therefore a vow is not always about a better good.
 Thomas Aquinas, Summa Theologica (1274). copy citation

add
Author Thomas Aquinas
Source Summa Theologica
Topic vow purpose
Date 1274
Language English
Reference
Note Translated by Fathers of the English Dominican Province
Weblink http://www.gutenberg.org/cache/epub/18755/pg18755-images.html

Context

“Since, then, the slaying of an innocent person is not a better good, but is in itself unlawful, it seems that a vow may be made not only about a better good, but also about something unlawful.
Obj. 3: Further, things that tend to be harmful to the person, or that are quite useless, do not come under the head of a better good. Yet sometimes vows are made about immoderate vigils or fasts which tend to injure the person: and sometimes vows are about indifferent matters and such as are useful to no purpose. Therefore a vow is not always about a better good. On the contrary, It is written (Deut. 23:22) : "If thou wilt not promise thou shalt be without sin."
I answer that, As stated above (A. 1) , a vow is a promise made to God. Now a promise is about something that one does voluntarily for someone else: since it would be not a promise but a threat to say that one would do something against someone.” source