Over at Journeys in Alterity, Kyle asks a very good question about civil law or canon law compelling a person to heroism. In looking at Canon Law, there are two distinct exceptions in which I took notice.
In Canon 1323 The following are not subject to a penalty when they have violated a law or precept:
a person who acted coerced by grave fear, even if only relatively grave, or due to necessity or grave inconvenience unless the act is intrinsically evil or tends to the harm of souls.
In Canon 1324 The perpetrator of a violation is not exempt from a penalty, but the penalty established by law or precept must be tempered or a penance employed in its place if the delict was committed:
by a person who was coerced by grave fear, even if only relatively grave, or due to necessity or grave inconvenience if the delict is intrinsically evil or tends to the harm of souls.
There are more exceptions to the penalty here.
At first it seemed like the canon law could be asking too much of an individual when their life is at stake but after taking a look at what canon law states and what exceptions there are in accordance with certain knowledge or lack thereof and if one’s life is in grave danger, the Church’s position seems quite tenable.