Honoring God with Integrity (James 5:12)

James tells us, “do not swear, either by heaven or by earth or by any other oath” which sounds like we are not to take an oath under any circumstances.  However, our catechism teaches that we can take an oath.  Does this mean that we are merely traditionalists following our tradition?  Can we see in Scripture times when we do take an oath?