When a defendant is prosecuted in a criminal action for a misdemeanor, other than a violation of RCW
9A.48.105, for which the person injured by the act constituting the offense has a remedy by a civil action, the offense may be compromised as provided in RCW
10.22.020, except when it was committed:
(1) By or upon an officer while in the execution of the duties of his or her office;
(2) Riotously;
(3) With an intent to commit a felony; or
(4) By one family or household member against another or by one intimate partner against another as defined in RCW
10.99.020 and was a crime of domestic violence as defined in RCW
10.99.020.