2,719. Oaths That Aren't in God's Name

Hilchos Shevuos 12:2

Taking a false oath is one of the most serious sins, as we discussed in Hilchos Teshuva. While it doesn’t cause one to incur kareis (spiritual excision) or capital punishment by the courts, it is a desecration of God's name, which is worse than any other sin.

Hilchos Shevuos 12:3

If someone takes an oath by Heaven and Earth, or by the sun or something similar, this isn’t an oath even if his intention is the One Who created these things. Similarly, if one takes an oath by one of the prophets or by one of the books of the Tanach, this isn’t an oath even if his intention is the One Who sent that prophet or gave the commandments in that book. While these aren’t oaths, those who make such statements are given strict warnings and we teach people not to treat this lightly. Rather, we act as if these are oaths and provide them with the opportunity to absolve them.