Now, the first question is whether a man—in cases where he cannot avoid answering Yes or No—has the right to be untruthful. The second question is whether, in order to prevent a misdeed that threatens him or someone else, he is not actually bound to be untruthful in a certain statement to which an unjust compulsion forces him.
Truth in utterances that cannot be avoided is the formal duty of a man to everyone, however great the disadvantage that may arise from it to him or any other; and although by making a false statement I do no wrong to him who unjustly compels me to speak, yet I do wrong to men in general in the most essential point of duty, so that it may be called a lie (though not in the jurist’s sense), that is, so far as in me lies I cause that declarations in general find no credit, and hence that all rights founded on contract should lose their force; and this is a wrong which is done to mankind.
This benevolent lie may, however, by accident (casus) become punishable even by civil laws; and that which escapes liability to punishment only by accident may be condemned as a wrong even by external laws. For instance, if you have by a lie hindered a man who is even now planning a murder, you are legally responsible for all the consequences. But if you have strictly adhered to the truth, public justice can find no fault with you, be the unforeseen consequence what it may. (italicization mine)
It is possible that whilst you have honestly answered Yes to the murderer’s question, whether his intended victim is in the house, the latter may have gone out unobserved, and so not have come in the way of the murderer, and the deed therefore have not been done; whereas, if you lied and said he was not in the house, and he had really gone out (though unknown to you) so that the murderer met him as he went, and executed his purpose on him, then you might with justice be accused as the cause of his death. For, if you had spoken the truth as well as you knew it, perhaps the murderer while seeking for his enemy in the house might have been caught by neighbors coming up and the deed been prevented. Whoever then tells a lie, however good his intentions may be, must answer for the consequences of it, even before the civil tribunal, and must pay the penalty for them, however unforeseen they may have been; because truthfulness is a duty that must be regarded as the basis of all duties founded on contract, the laws of which would be rendered uncertain and useless if even the least exception to them were admitted. To be truthful (honest) in all declarations is therefore a sacred unconditional command of reason, and not to be limited by any expediency.