Except as expressly provided by this Code, a judicial officer is not criminally responsible for anything done or omitted to be done by the judicial officer in the exercise of the officer’s judicial functions, although the act done is in excess of the officer’s judicial authority, or although the officer is bound to do the act omitted to be done.