A husband cannot be examined for or against his wife without her consent, nor a wife for or against her husband without his consent, nor can either, during the marriage or afterwards, without the consent of the other, be examined as to any communication made by one to the other during the marriage. This exception does not apply to a civil action or proceeding by one against the other, nor to a criminal action or proceeding for a crime committed by one against the other or against a child of either or against a child under the care of either spouse, nor to a criminal action or proceeding in which one is charged with homicide or an attempt to commit homicide and the date of the marriage of the defendant is subsequent to the date of the offense, nor to an action or proceeding for nonsupport, neglect, dependency, or termination of parental rights.