According to the Hindu law, there are some situations where a person can get exemption from punishment for certain offences. For example, a person who is already married can marry another person during the lifetime of the spouse, if the spouse has been absent for seven years or more and the person has not heard of the spouse being alive within that time. This is based on the presumption of death of the spouse and the good faith of the person who remarries. However, this exemption does not apply if the person has reason to believe that the spouse is alive or if the person conceals the fact of the first marriage from the second spouse.
Another example of exemption from punishment under Hindu law is the doctrine of necessity, which states that a person who commits an offence under compulsion or duress is not liable for it. This doctrine is based on the principle that a person should not be punished for something that is beyond his or her control or will. For instance, a person who kills another person in self-defence or to save the life of a third person is not guilty of murder, as he or she acted out of necessity and not with any malicious intent. However, this doctrine has some limitations, such as the requirement of proportionality between the harm caused and the harm avoided, and the absence of any alternative course of action.