15. 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.
Bharatiya Nyaya Sanhita, 2023
Section 15: Act of Judge when acting judicially
Chapter III — General Exceptions
Source: official text of the Bharatiya Nyaya Sanhita, 2023 (Ministry of Home Affairs).