St. Thomas Aquinas
“It is written (1 Cor. 11:29): ‘He that eateth and drinketh unworthily, eateth and drinketh judgment to himself’: and a gloss of the same passage makes the following commentary: ‘He eats and drinks unworthily who is in the state of sin, or who handles (the sacrament) irreverently; and such a one eats and drinks judgment, i.e. damnation, unto himself.’ Therefore, he that is in mortal sin, by taking the sacrament heaps sin upon sin, rather than obtains forgiveness of his sin.”
Source: St. Thomas Aquinas, Summa Theologica