Except for an officer specified in §§ 2–202 through 2–205 of this subtitle, an officer elected or appointed to any office of trust or profit under the Maryland Constitution or other State law, including a mayor or other chief executive officer of a municipal corporation, shall take and subscribe the oath required by Article I, § 9 of the Maryland Constitution before a clerk or a deputy clerk of the circuit court.