
195 Cal.App.2d 855 (1961)
THE PEOPLE, Respondent,
v.
JOHN JAMES GRIFFIN, Appellant.
Crim. No. 7527. 
California Court of Appeals. Second Dist., Div. Two.  
Oct. 2, 1961.
 Harold Thomasian and Dennis N. Reid for Appellant.
 Stanley Mosk, Attorney General, William E. James, Assistant Attorney General, and George W. Kell, Deputy Attorney General, for Respondent.
 McMURRAY, J. pro tem.  [fn. *]
 This is an appeal from judgment and order denying new trial by a defendant who was convicted of a violation of section 702 of the Welfare and Institutions Code which at that time was the section governing the offense of contributing to the delinquency of a minor, he having stood trial before a jury on an information charging a violation of Penal Code section 288. On this appeal appellant urges two main points: first, that his commitment for trial in the superior court was illegal because the committing magistrate allowed the investigating officer to remain in court during the testimony of the prosecuting witness at the preliminary hearing, he contending in this respect that a request had been made by both counsel that the courtroom *857 be cleared; and second, that appellant's right to appear in person or with counsel at all stages of the trial was denied since appellant did not participate in a conference held in chambers during the trial at which the instructions to be given to the jury were considered and discussed. Appellant contends that before this conference was held he had in fact discharged his attorney and that he was therefore without representation at that stage of the trial immediately preceding argument to the jury.
 The first contention of appellant is grounded upon the transcript of the proceedings at the preliminary examination where it appears that after counsel had approached the bench the following proceedings took place: "The Court: Yes. This is a preliminary hearing which shouldn't take a long time. However, the nature of this is such that Counsel have stipulated and request that the courtroom be cleared during the taking of the testimony of the child, ... Therefore, everyone will remain outside of the courtroom. [Emphasis added.]"
 "Her mother may remain and also the officer in charge of the investigation."
 "The defendant, of course, and his Counsel will remain in the courtroom but the rest of you people will be asked to step out into the hall."
 "Mr. Benson, you may call your first witness."
 [1] While it is mandatory, under section 868 of the Penal Code, that the magistrate "must also, upon the request of the defendant, exclude from the examination every person except his clerk, court reporter and bailiff, the prosecutor and his counsel, the Attorney General, the district attorney of the county, the defendant and his counsel, and the officer having the defendant in custody; provided, however, that when the prosecuting witness is a female she shall be entitled at all times to the attendance of a person of her own sex" and failure to exclude all persons except those enumerated in the section can constitute reversible error as a deprivation of a substantial right to a fair trial (People v. Elliot, 54 Cal.2d 498 [6 Cal.Rptr. 753, 354 P.2d 225]), nevertheless as is pointed out by Mr. Justice Peters in that opinion at page 505: "It is well established that an accused cannot ignore errors in the commitment procedure until after conviction and then attempt to raise such errors for the first time on appeal." This is exactly what appellant is attempting to do in this case and a full reading of the record discloses that no objection *858 was made by any counsel or by appellant to the action of the magistrate at the preliminary examination.
 [2] If appellant wished to insist upon his right to have persons excluded from the courtroom under provisions of Penal Code section 868, he should have expressed dissatisfaction at the time the court's ruling was made. Certainly if defendant's counsel had moved for the exclusion of all persons from the courtroom under provisions of section 868 it is unreasonable to suppose that he would have remained silent when the court ordered the exclusion of all persons excepting those above enumerated. [3] If a defendant moves for exclusion of witnesses under the above Penal Code section he should pursue the matter at every stage of the proceedings. The position taken by the defendant in People v. Elliot, 54 Cal.2d 498, supra, page 505, shows what a defendant should do who wishes to urge error in such an order: "She raised her objection to the magistrate's erroneous conduct at every stage in the proceedings and by every means available to her. She first attempted to invoke the protection of section 868 at the commencement of the preliminary examination. She repeatedly objected when the magistrate erroneously permitted the newspaper reporter to return to the courtroom. She moved in a timely manner to set aside the information in conformity with section 995 of the Penal Code. Then she sought a writ of prohibition, and, when this was denied, she further objected at the commencement of her trial. Under these circumstances, appellant is entitled to urge the illegality of her commitment as a ground for reversal on appeal."
 In the case of People v. Prizant, 186 Cal.App.2d 542 [9 Cal.Rptr. 282], wherein judgments were reversed for error in permitting an investigator to remain in court during the preliminary examination, it affirmatively appears that the exclusionary motion was made under section 868 of the Penal Code and also that a motion to set aside the information under section 995 of the Penal Code was made and denied before defendants therein entered their pleas and furthermore that at the commencement of the trial in chief the defendants again renewed their motion, which was again denied.
 The second point urged as a ground for reversal by appellant arises out of the following circumstances: After presentation of evidence had been completed and both sides had rested, a conference including the deputy district attorney, defense counsel and the judge was held in chambers concerning the subject of instructions, at which conference the judge announced *859 the instructions he intended to give. Immediately following this conference appellant was brought into chambers at his counsel's request and the trial judge was informed that appellant wished to argue the case before the jury himself because he did not feel that his attorney had properly presented the case or brought out many pertinent facts in the case. He further stated that he had relieved his attorney, who had refused to be relieved without talking to the judge. The court ordered appellant's motion to relieve counsel granted and allowed him to represent himself from that time forward. Thereafter, after argument and while the jury was being instructed, appellant questioned the propriety of the court's instructions for the first time. In a conference held out of the hearing of the jury the appellant asked "to straighten out the matter as to the instructions to the attorneys. I have several witnesses to bear fact that I discharged Mr. Ross early in the morning, and he nevertheless still went into chambers and accepted your instructions, which I did not have__________ The Court: What do you want me to do, Mr. Griffin, assuming what you say is true? Mr. Griffin: I was trying to have you rule on whether or not this is proper procedure. The Court: I believe it definitely is, Mr. Griffin. I believe your rights are as completely protected as they possibly could be. Mr. Griffin: How do I know what the instructions were? The Court: I just read them, all but one, to the jury, and they are in printed form, and they are going into the jury room when the jury deliberates. What is it you want me to do? Mr. Griffin: Well, that was what I wanted, for you to make a decision on whether or not my rights have been violated by an attorney taking over when he had been no longer--he had been paid, he is paid in full. He has nothing to worry about."
 [4] There seems to be little doubt that a party may discharge his attorney at any time. (People v. Norton, 16 Cal. 436, 440; O'Connell v. Superior Court, 2 Cal.2d 418, 421 [41 P.2d 334, 97 A.L.R. 918].) However, Penal Code section 686, subdivision 2 provides that a defendant is entitled "2. To be allowed counsel as in civil actions, or to appear and defend in person and with counsel." In civil actions attorneys may be substituted at any time by a stipulation filed with the clerk or entered in the minutes or upon application to the court after proper notice. (Code Civ. Proc.,  284.) In civil actions the opposing party must also be notified of the change of attorneys. (Code Civ. Proc.,  285.) While Ex *860 parte Clarke, 62 Cal. 490 and People v. Garnett, 9 Cal.App. 194 [98 P. 247] held that a change of attorney could be effected without compliance with the foregoing Code of Civil Procedure sections that holding has been limited to the particular factual situations there presented by People v. Bouchard, 49 Cal.2d 438 [317 P.2d 971], and In re Martinez, 52 Cal.2d 808 [345 P.2d 449].
 [5] For an exhaustive discussion of the rights of an accused to the aid of counsel see People v. Mattson, 51 Cal.2d 777 wherein it is said at page 794 [336 P.2d 937] that if a defendant elects to represent himself "... he assumes for all purposes connected with his case, and must be prepared to be treated as having, the qualifications and responsibilities concomitant with the role he has undertaken; he is not entitled either to privileges and indulgences not accorded attorneys or to privileges and indulgences not accorded defendants who are represented by counsel." [6] In the instant case where appellant had not informed the court of the fact that he had discharged his attorney before the conference relative to the instructions took place, he cannot now complain that he was not represented at that conference. (See People v. Abbott, 47 Cal.2d 362, 372 [303 P.2d 730].) [7] To allow a defendant to reopen, retrace, and retry an entire criminal case upon a whimsical or designed discharge of his attorney after the entire case is in would be to invite needless confusion in the trial courts. In People v. Elledge, 186 Cal.App.2d 656, it is said at page 659 [9 Cal.Rptr. 188]: "The appellant's criticism of his own counsel does not present a sufficient basis on which to ask a reversal of the judgment. The Supreme Court stated in People v. Wein, 50 Cal.2d 383, at page 410 [326 P.2d 457]: 'The handling of the defense by counsel of the accused's own choice will not be declared inadequate except in those rare cases where his counsel displays such a lack of diligence and competence as to reduce the trial to a "farce or a sham." ' The representation of the appellant was adequate and there was no denial of due process in this case."
 [8] The only instruction which defendant claims prejudiced him was one requested by his counsel and which instructed the jury that in case of reasonable doubt it was their duty to find the defendant guilty only of a necessary lesser included offense if such necessary included lesser offense was proved beyond a reasonable doubt. The People objected to the giving of this instruction, the trial court *861 properly gave the instruction, and under the facts which appear in the transcript, had he failed to so instruct it might well have resulted in error.
 The judgment and order appealed from are affirmed.
 Fox, P. J., and Ashburn, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
