(a) If the cause assigned for a divorce is that specified in § 36-4-101(a)(11), the defendant may make defense by alleging and proving the ill conduct of the complainant as a justifiable cause for the conduct complained of, and on making out the defense to the satisfaction of the court, the bill may be dismissed with or without costs, in the discretion of the court.
(b) But, if the court is of the opinion that the complainant is entitled to relief, it may be granted, according to the prayer of the bill, by annulling the marriage, or by ordering a separation, perpetual or temporary, or such other decree as the nature and circumstances of the case require.