In general, whatever makes the contrary of a thing impossible, whatever may be the cause of such impossibilities.
Whatever is done through necessity, is done without any intention, and as the act is done without will, and is compulsory, the agent is not legally responsible. Hence the maxim, necessity has no law; indeed necessity is itself a law which cannot be avoided nor infringed.
It follows, then, that the acts of a man in violation of law., or to the injury of another, may be justified by necessity, because the actor has no will to do or not to do the thing, he is a mere tool; but, it is conceived, this necessity must be absolute and irresistible, in fact, or so presumed in point of law.
The cases which are justified by necessity, may be classed as follows: For the preservation of life; as if two persons are on the same plank, and one must perish, the survivor is justified in having thrown off the other, who was thereby drowned.
Obedience by a person subject to the power of another; for example, if a wife should commit a larceny with her husband, in this case the law presumes she acted by coercion of her husband, and, being compelled, by necessity, she is justifiable. Those cases which arise from the act of God, or inevitable accident, or from the act of man, as public enemies.
There is another species of necessity. The actor in these cases is not compelled to do the act whether he will or not, but he has no choice left but to do the act which may be injurious to another, or to lose the total use of his property. For example, when a man's lands are surrounded by those of others, so that he cannot enjoy them without trespassing on his neighbors. The way which is thus obtained, is called a way of necessity.