What you are referring to is this:
Canon 1118 (1983 CIC 1141)
A ratified and consummated valid marriage can be dissolved by no human power and for no cause, outside of death.
The key word here is "valid".
Impediments to marriage, under the 1917 code are as follows:
Canon 1067 (1983 CIC 1072, 1083)
§ 1. A man before completing the sixteenth year of age, and a woman before completing the fourteenth year of age, cannot enter into valid marriage.
§ 2. Although marriage can be validly contracted above these ages, nevertheless, let pastors take care to discourage youths from entering marriage before that age that, according to the accepted manner of the region, they are wont to enter marriage.
Canon 1068 (1983 CIC 1084)
§ 1. Antecedent and perpetual impotence, either on the part of the man or on the part of the woman, whether known or not, whether absolute or relative, impedes marriage by natural law itself. § 2. If the impediment of impotence is doubtful, whether this be a doubt of law or doubt of fact,
marriage should not be impeded.
§ 3. Sterility neither impedes nor [renders illicit] marriage.
Canon 1069 (1983 CIC 1085)
§ 1. They invalidly attempt marriage who are bound by a prior bond, even if it is not consummated, with due regard for the privilege of the faith.
§ 2. Although a prior marriage is null or is dissolved for any cause, it is not therefore permitted to contract another before the nullity or dissolution of the first is legitimately and certainly established.
1070 (1983 CIC 1086)
§ 1. That marriage is null that is contracted between a non-baptized person and a person baptized in the Catholic Church or converted to her from heresy or schism.
§ 2. If a party at the time of contracting marriage was commonly considered baptized, or there is doubt about the baptism, the validity of the marriage is to be upheld according to the norm of Canon 1014 until it is certainly proved that the one party was baptized and the other was not baptized.
Canon 1071 (1983 CIC 1129)
Those things that are prescribed for mixed marriages in Canons 1060–64 must also be applied to those marriages that are barred due to the impediment of disparity of cult.
Canon 1072 (1983 CIC 1087)
Clerics constituted in sacred orders invalidly attempt marriage.
Canon 1073 (1983 CIC 1088)
Likewise religious who are professed by solemn vows invalidly attempt marriage, [as do those] who are in simple vows to which, by special prescription of the Apostolic See, there is added [a clause] invalidating weddings.
Canon 1074 (1983 CIC 1089)
§ 1. Between a kidnapping man and a woman kidnapped with designs of marriage, as long as she remains in the power of the kidnapper, there can exist no marriage.
§ 2. But if she who was kidnapped is set in a safe and free place, separate from the kidnapper, and she consents to have this man, the impediment ceases.
§ 3. As to what applies to the nullity of marriage, the violent retention of a woman is considered the same as kidnapping, namely, when a man violently retains a woman with the intention of entering marriage, while she is in the place where she lives or to which she freely comes.
Canon 1075 (1983 CIC 1090)
They cannot validly contract marriage:
1.° Who, during the same legitimate marriage, consummate adultery with each other with the promise of giving each other to marriage or, even only by a civil act, attempt marriage;
2.° Who, also during the same legitimate marriage, commit adultery with each other
and one or the other of them perpetrates spousicide;
3.° Who, by mutual physical or moral efforts, even without adultery, bring about the death of a spouse.
1076 (1983 CIC 1091)
§ 1. In the direct line, consanguinity renders marriage invalid between all ascendants and descendants, whether legitimate or natural.
§ 2. In the collateral line, [marriage] is invalid up to the third degree inclusive, and the impediment [against] marriage is multiplied as often as the common ancestor is multiplied.
§ 3. Marriage is never permitted if there exists a doubt as to whether the parties are related in any degree of the direct line of consanguinity or in the first grade of the collateral line.
Canon 1077 (1983 CIC 1092)
§ 1. Affinity in the direct line is a diriment [impediment] for marriage in any grade; in the collateral line, [it is] up to the second degree inclusive. § 2. The impediment of affinity is multiplied:
1.° As often as the impediment of consanguinity from which it comes is multiplied; 2.° By a second marriage with a blood-relative of the deceased spouse.
Canon 1078 (1983 CIC 1040, 1076)
The impediment of public honesty arises from an invalid marriage, whether consummated or not, and from public or notorious concubinage; it prevents marriage in the first or second degree of the direct line between a man and the blood-relatives of the woman, and vice versa.
1079 (n/a)
Only the spiritual relationship discussed in Canon 768 invalidates marriage.
Canon 1080 (1983 CIC 1094)
Those who are considered incapable of entering a wedding between themselves under civil law because of a legal relationship arising due to adoption cannot validly contract marriage between themselves under canon law either.