What do you mean by ' illegal move'? If a judge exceeds his powers in e.g sentencing that's a matter for appeal but the common law rule still applies.
The normal case where you invite the judge to discharge himself is where you argue that the judge may be suspected, or thought, by the public as biased. For example, you might know that the judge is a shareholder in some public company which is connected with the complainant [what we used to call 'the plaintiff'] or defendant in an action. You might draw that to the judge's attention. Whether he then discharges himself is a matter for him, but you'd expect him to give reasons why he will continue e.g. he might say that he is but one of milions of shareholders in this vast public company and the party is only a tiny subsidiary of it. Or you might know that one of the witnesses to be called is a friend or relative of the judge. He may not know that the person is a witness.You really don't want to find, half way through a trial, that you are calling the judge's married sister and the judge is being expected to rule on her credibillity! The judge would almost certainly say that he can't try or continue to try the case and would discharge himself , but he wouldn't thank you for not inviting him to do so as soon as you were aware of the fact, when he wasn't !
In my experience of the latter, it's usually the judge himself who first knows and points out that the witness is known to him in some way,.he explains how and why and invites counsel to say whether they feel that is objectionable to them and their side.