EXOD384 It is a negative commandment not to swear in vain as Scripture says, You shall not take the name of Hashem your God in vain [this verse]. A vain oath is divided into four categories: (1) If one swears to a change in something known; for example, if he swears about a man that he is a woman, or about a stone that it is gold. (2) If he swears to no purpose; for example, he takes an oath about a stone that it is a stone. (3) If he takes an oath to fail to observe a mitzvah. (4) If he swears to do something which is impossible to fulfill; for example, that he will not sleep for three days in a row, or that he will taste no food for seven days in a row. Over every one of these oaths, if he swore it willfully, he should receive whiplashes; and if it was unwitting, he is free of penalty. If someone says a benediction in vain [needlessly] or he utters the name of Heaven [God] to no purpose, he violates the injunction, You shall not take the name, etc.
SHOW FULL EXCERPT