A total divorce annuls a marriage from the time of the rendition of the decree, unless the divorce is granted for a cause rendering the marriage void originally, in which case the divorce serves to annul the marriage from its inception. However, the issue of the marriage shall not be rendered born out of wedlock by a divorce, except in cases of pregnancy of the wife by a man other than the husband at the time of the marriage, unknown to the husband.