I answer that, An obligation implies something to be done or omitted; so that apparently it regards neither the declaratory oath (which is about something present or past), nor such oaths as are about something to be effected by some other cause (as, for example, if one were to swear that it would rain tomorrow), but only such as are about things to be done by the person who swears.
Now just as a declaratory oath, which is about the future or the present, should contain the truth, so too ought the oath which is about something to be done by us in the future. Yet there is a difference: since, in the oath that is about the past or present, this obligation affects, not the thing that already has been or is, but the action of the swearer, in the point of his swearing to what is or was already true; whereas, on the contrary, in the oath that is made about something to be done by us, the obligation falls on the thing guaranteed by oath. For a man is bound to make true what he has sworn, else his oath lacks truth.
Now if this thing be such as not to be in his power, his oath is lacking in judgment of discretion: unless perchance what was possible when he swore become impossible to him through some mishap. as when a man swore to pay a sum of money, which is subsequently taken from him by force or theft. For then he would seem to be excused from fulfilling his oath, although he is bound to do what he can, as, in fact, we have already stated with regard to the obligation of a vow (Question [88], Article [3], ad 2). If, on the other hand, it be something that he can do, but ought not to, either because it is essentially evil, or because it is a hindrance to a good, then his oath is lacking in justice: wherefore an oath must not be kept when it involves a sin or a hindrance to good. For in either case "its result is evil" [*Cf. Bede, Homil. xix, in Decoll. S. Joan. Bapt.]
Accordingly we must conclude that whoever swears to do something is bound to do what he can for the fulfilment of truth; provided always that the other two accompanying conditions be present, namely, judgment and justice.