(a) No crime may be compromised, nor any proceeding for the prosecution or punishment therefor stayed upon a compromise, except as provided in this chapter or other law.
(b) When an information charges a misdemeanor, for which the person injured by the act constituting the crime has a civil action, the crime may be compromised except when it was committed —
(1) by or upon an officer of the peace while in the execution of the duties of his office; or
(2) riotously; or
(3) with intent to commit a felony.