One common error in Catholic ethics is the claim that an act cannot be made immoral by a bad consequence, if that consequence is unintended. On the basis of this claim, unintended bad consequences, no matter how severe, are incorrectly dismissed from the moral evaluation of the act.
Correct doctrine on this point of ethics is that intention and consequences are separate fonts of morality. The three fonts of morality are (1) intention, (2) moral object, (3) consequences. Any bad intention makes the first font bad and the act immoral. So, if a person were to intend a bad consequence as an end, the intention and therefore the act would be a sinful. If the bad consequence is unintended, and there is nothing else immoral in the intention, then the first font is good. But this still leaves the proper evaluation of the third font of circumstances.
The font called circumstances is bad if the reasonably anticipated bad consequences (harm of any kind) morally outweighs the reasonably anticipated good consequences. The intention or lack thereof does not affect this moral evaluation of the third font. It only affects the moral evaluation of the first font. If the bad consequences morally outweigh the good consequences, as these can be reasonably anticipated at the time the act is chosen, then the third font is bad and the act is immoral, even if those bad consequences are not intended.
Another common misunderstanding in ethics is the claim that physical evil can never be intended as a means. Evil is a deprivation of good. There are three types of evil:
(1) moral evil, which is sin
(2) physical evil, which is any type of harm or disorder (not only physical harm)
(3) metaphysical evil, which is the limited good of each finite thing (finiteness)
To intend physical evil as an end is immoral, because it is contrary to the will of God who created all things and made all things good. To intend moral evil as an end or a means is immoral, because it involves a choice by the will of immorality. An immoral means cannot be justified by a good end. But to intend physical evil as a means to a good end is not immoral, as long as the good of the end outweighs the harm of the means. The saying that the end does not justify the means refers to immoral means, and not merely to physical evil.
So, for example, a physician may amputate a limb (physical evil) in order to save a life. The good of the end outweighs the harm of the means. Similarly, the Church may excommunicate (cut off) a member in order to save the whole from harm by that member, if he commits heresy or some other grave sin. The loss of a member is a disorder, but it is necessary to a greater good end. Therefore also, a person who kills in self-defense may intend the death of the aggressor as a means to the good end of protecting innocent life. The death of the aggressor in this act is physical evil (harm), but it is not moral evil, because the aggressor is guilty of a grave assault.
More on this topic is found in my book:
The Catechism of Catholic Ethics: A work of Roman Catholic moral theology
Ronald L. Conte Jr.
Roman Catholic theologian and Bible translator