Section 74 in Indian Penal Codes
Title: Limit of solitary confinement
In executing a sentence of solitary confinement, such confinement shall in no case exceed fourteen days at a time, with intervals between the periods of solitary confinement of not less duration than such periods; and when the imprisonment awarded shall exceed three months, the solitary confinement shall not exceed seven days in any one month of the whole imprisonment awarded, with intervals between the periods of solitary confinement of not less duration than such periods.
Title: Enhanced punishment for certain offences under Chapter XII or Chapter XVII after previous conviction
Whoever, having been convicted,—
(a) by a Court in 2[India], of an offence punishable under Chapter XII or Chapter XVII of this Code with imprisonment of either description for a term of three years or upwards, 3[***] 3[***] shall be guilty of any offence punishable under either of those Chapters with like imprisonment for the like term, shall be subject for every such subsequent offence to 4[imprisonment for life], or to imprisonment of either description for a term which may extend to ten years.]
Title: Act done by a person bound or by mistake of fact believing himself bound by law
Nothing is an offence which is done by a person who is, or who by reason of a mistake of fact and not by reason of a mistake of law in good faith believes himself to be, bound by law to do it. Illustrations
(a) A, a soldier, fires on a mob by the order of his superior officer, in conformity with the commands of the law. A has committed no offence.
(b) A, an officer of a Court of Justice, being ordered by that Court to arrest Y, and, after due enquiry, believing Z to be Y, arrests Z. A has committed no offence.
Title: Act of Judge when acting judicially
Nothing is an offence which is done by a Judge when acting judicially in the exercise of any power which is, or which in good faith he believes to be, given to him by law.
Title: Act done pursuant to the judgment or order of Court
Nothing which is done in pursuance of, or which is warranted by the judgment or order of, a Court of Justice; if done whilst such judgment or order remains in force, is an offence, notwithstanding the Court may have had no jurisdiction to pass such judgment or order, provided the person doing the act in good faith believes that the Court had such jurisdiction.