
184 Cal.App.4th 451 (2010)
109 Cal.Rptr.3d 207
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent;
THOMAS JEROME MITCHELL, Real Party in Interest.
No. B220991.
Court of Appeals of California, Second District, Division Two.
May 6, 2010.
*453 Steve Cooley, District Attorney, Irene Wakabayashi and Brentford J. Ferreira, Deputy District Attorneys, for Petitioner.
No appearance for Respondent.
Michael P. Judge, Public Defender, Elizabeth Lashley-Haynes and Albert J. Menaster, Deputy Public Defenders, for Real Party in Interest.

OPINION
ASHMANN-GERST, J.
In the underlying murder case against Thomas Jerome Mitchell (Mitchell), the trial court excluded multiple prosecution witnesses, dog scent evidence and gunshot residue evidence as a sanction for the People's failure to provide discovery. By way of writ petition, the People contend that the trial court exceeded its jurisdiction under Penal Code section *454 1054.5, subdivision (c)[1] because it was required to exhaust less drastic sanctions first.[2] We agree and grant the petition.

FACTS
In 2006, Mitchell was charged with the murder of Nicole Kaster (Kaster) for the benefit of a criminal street gang.
At the preliminary hearing, the trial court heard testimony from members of the Los Angeles County Sheriff's Department. The investigating officers learned that Michael Minor was shot and killed. As the shooting occurred, someone yelled, "Eastside Duarte." Michael Minor's son was a member of the Du-Roc Crip gang. At the time, the Eastside Duarte gang was at war with the Du-Roc Crip gang. When Mitchell, Lamone Lacy (Lacy),[3] Robert Paden (Paden) and other Du-Roc Crip gang members heard about Michael Minor's murder, they were upset. They were all at the home of Mitchell's sister. There was a TEC-9 machinegun near a dumpster on her property. Lacy got a call informing him that his infant son needed medical attention due to breathing problems. He drove his girlfriend Yvette Bodella (Bodella)[4] and son to a hospital.
A few hours later, an Eastside Duarte gang member named Marcus Maturino was standing next to Kaster in front of Kaster's residence drinking beer. About 1:00 a.m. on August 10, 2006, they received gunfire. A witness saw Paden and another Black male shoot at Kaster's residence from across the street. She was shot in the face and killed. The shooting was done for the benefit of the Du-Roc Crip gang as immediate retaliation for the murder of Michael Minor. Mitchell was arrested and interviewed. He said he was the getaway driver but was not involved in the shooting of Kaster. He admitted he saw a gun that night and had a good idea what was going to happen. A confidential informant verified that Mitchell drove the shooters to the scene of the crime.
A TEC-9 machinegun was recovered from Lacy's residence. He was questioned and said that after Kaster's murder he looked for the weapon at Mitchell's sister's house and found an empty gun case. Mitchell told Lacy that the weapon was "hot" and that it was in the possession of Steven Skills Barron (Barron). Lacy drove to Barron's residence and obtained the weapon *455 from Barron. The investigating officers believed the TEC-9 machinegun was used in the shooting of Kaster. Joe Dallura, the scent K-9 handler for the Los Angeles County Sheriff's Department, did a scent comparison of Mitchell's jailhouse clothes and the bullet casings recovered from the shooting.[5]
Over the next several years, the trial court repeatedly ordered Deputy District Attorney Martin J. Bean (Bean) to produce discovery and meet and confer with Deputy Public Defender David L. Canas. In June 2009, Deputy Public Defender Elizabeth Lashley-Haynes (Lashley-Haynes) was assigned to represent Mitchell. Months later, the trial court ordered the People to turn over dog scent evidence and provide a date, time and place for Lashley-Haynes to interview Lacy.[6] The deadline was October 7, 2009.
Lashley-Haynes filed a motion to compel production of discovery and requested all reports and tests regarding scientific evidence, and updated information from the murder book. She also filed a motion to preclude dog scent evidence and prevent Lacy's testimony. She submitted a declaration and averred: Prior to October 7, 2009, she spoke to Bean and reminded him that she needed the dog scent evidence and a meeting with Lacy. On the due date of the discovery, Bean said he believed that Lashley-Haynes had received all the dog scent evidence, and that he had not set up a meeting with Lacy.
At the hearing, the trial court precluded dog scent and gunshot residue evidence. Next, the trial court precluded the testimony of Lacy and his fiancé, Bodella. As to the murder book, Lashley-Haynes stated: "[S]ince this case is three years old I would believe that there has been ongoing interviews and investigation by the police department aside from the original murder book that was produced in [2006]. I think it's logical to assume that the police continue to investigate considering that there are two potential shooters out there in this case and maybe they haven't but I would request that the court have the [investigating officer] on this case take the stand and state that since 2006, he has interviewed no one." The trial court replied: "I think it would be more efficient to just preclude any testimony by any [of the] People's witness[es] regarding any information not previously provided to the defense."[7]
*456 This writ petition followed.

DISCUSSION

I. The law of writ review.

(1) In general, the People are barred from seeking an extraordinary writ if it is not authorized by statute. (People v. Superior Court (Meraz) (2008) 163 Cal.App.4th 28, 45-46 [77 Cal.Rptr.3d 352].) "If the prosecution has not been granted by statute a right to appeal, review of any alleged error may be sought by a petition for writ of mandate only when a trial court has acted in excess of its jurisdiction and the need for such review outweighs the risk of harassment of the accused. [Citations.]" (People v. Superior Court (Stanley) (1979) 24 Cal.3d 622, 625-626 [156 Cal.Rptr. 626, 596 P.2d 691], fn. omitted.)
Some courts have taken an expansive view of the phrase "excess of jurisdiction," holding that where the law allows a court to act in only one way, the court exceeds its jurisdiction by doing anything else and the error can be corrected through writ review. (People v. Municipal Court (Bonner) (1980) 104 Cal.App.3d 685, 694 [163 Cal.Rptr. 822] (Bonner) [writ review appropriate when the trial court acted in excess of jurisdiction by granting a defense motion for discovery even though the defense failed to show justification, as required by case law]; People v. Superior Court (Duran) (1978) 84 Cal.App.3d 480, 486 [148 Cal.Rptr. 698] [writ review appropriate when the trial court acted in excess of jurisdiction by applying the wrong statute in sentencing a defendant].) Other courts have taken a restrictive stance, holding that there is no basis for writ review unless the trial court acts without subject matter or personal jurisdiction. (People v. Municipal Court (Kong) (1981) 122 Cal.App.3d 176, 183 [175 Cal.Rptr. 861] (Kong); People v. Superior Court (Ludwig) (1985) 174 Cal.App.3d 473, 475 [220 Cal.Rptr. 87] (Ludwig) [writ review determined appropriate under Kong because the trial court exceeded subject matter jurisdiction by entering a plea bargain in violation of § 1192.7].)
(2) Regardless of the split of authority amongst the intermediate courts, we reject Mitchell's argument that a trial court does not exceed its jurisdiction when its actions are contrary to statutory mandate. He starts by citing People v. Superior Court (Howard) (1968) 69 Cal.2d 491, 500 [72 Cal.Rptr. 330, 446 P.2d 138] (Howard). Howard surveyed nine cases. Four cases *457 limited the term "jurisdiction" to the traditional sense, i.e., subject matter and personal. Five cases held "that the issuance of mandate at the request of the People to review orders in criminal proceedings is not limited to cases where the trial court has acted in excess of its jurisdiction in the traditional sense." (Ibid.) Impliedly, Howard limited but did not eliminate writ review of acts in excess of jurisdiction in the nontraditional sense. It held that before review is permitted, the reviewing court must balance the competing considerations "of preventing harassment of the accused as against correcting possible errors." (Id. at p. 501.) The only clear rule Howard created was that writ review is not permissible where "there is a danger of further trial or retrial" because the defendant will be unduly burdened. (Ibid.) Howard did not decide whether a trial court's act in contravention of statute amounts to a violation of subject matter jurisdiction or a nontraditional notion of jurisdiction.
Howard disapproved People v. Superior Court (County of Alameda) (1927) 202 Cal. 165 [259 P. 943] and People v. Superior Court (Jonsson) (1966) 240 Cal.App.2d 90 [49 Cal.Rptr. 365]. Those two cases improperly "permitted the issuance of mandate where there was a danger of retrial." (Howard, supra, 69 Cal.2d at p. 501.) In contrast, Howard reviewed but did not disapprove of People v. Superior Court (Guerrero) (1962) 199 Cal.App.2d 303 [18 Cal.Rptr. 557] (after the defendant pleaded guilty to murder in the first degree, the trial court granted probation contrary to its statutory power), People v. Superior Court (Kasparek) (1962) 202 Cal.App.2d 850 [21 Cal.Rptr. 178] (after the defendant pleaded guilty to petty theft, the trial court dismissed the case without the power to do so) and People v. Superior Court (King) (1967) 249 Cal.App.2d 714 [57 Cal.Rptr. 892] (the trial court exceeded the bounds of judicial discretion by dismissing an information after reviewing the evidence of guilt in the preliminary hearing transcript). In each case, the reviewing court granted writ relief to the People on the grounds that the trial court acted in a manner not permitted by the law. These cases have not been abrogated.
Our Supreme Court did nothing to alter Howard in a second case cited by Mitchell, People v. Superior Court (Edmunds) (1971) 4 Cal.3d 605 [94 Cal.Rptr. 250, 483 P.2d 1202] (Edmunds).
(3) Edmunds summarized Howard by stating: "We disapproved certain prior cases which had suggested that every judicial act in excess of power is also an excess of jurisdiction, and which had thereby extended the term `jurisdiction' beyond its traditional sense, `i.e., where the trial court has acted without jurisdiction of the subject matter or of the person.' . . . We concluded that mandate should not be available to the People to review every claim of error, and should be denied where there exists a danger of further trial or retrial." (Edmunds, supra, 4 Cal.3d at p. 608, citation omitted.) Edmunds could be perceived as curtailing writ review unless the People are challenging *458 subject matter or personal jurisdiction. But Edmunds does not expressly create such a rule, nor does it suggest that Howard did. In any event, Edmunds held that the trial court "had no jurisdiction or discretion to entertain at trial defendant's renewed motion to suppress, which had been previously denied by the court at a special hearing." (Id. at p. 611.) The court concluded that the trial court had no subject matter jurisdiction to act in contravention of the authority given to it by section 1538.5. (Edmunds, supra, 4 Cal.3d at p. 609.) In other words, Edmunds held that an act in excess of statutory authority was an act in excess of subject matter jurisdiction.
(4) What is curious about Edmunds is that it never defined what it means to lack subject matter jurisdiction. But elsewhere, our Supreme Court has weighed in on the issue, stating: "Subject matter jurisdiction . . . is the power of the court over a cause of action or to act in a particular way. [Citations.]" (Greener v. Workers' Comp. Appeals Bd. (1993) 6 Cal.4th 1028, 1035 [25 Cal.Rptr.2d 539, 863 P.2d 784].) The second part of the definition, "to act in a particular way," is consistent with the holding in Edmunds that an act barred by statute exceeds subject matter jurisdiction. (Ibid.) It is also consistent with the Court of Appeal's current view of the law. (Dial 800 v. Fesbinder (2004) 118 Cal.App.4th 32, 42 [12 Cal.Rptr.3d 711] ["Subject matter jurisdiction is conferred by constitutional or statutory law."]; Guardianship of Ariana K. (2004) 120 Cal.App.4th 690, 701 [15 Cal.Rptr.3d 817] [same]; TrafficschoolOnline, Inc. v. Superior Court (2001) 89 Cal.App.4th 222, 231 [107 Cal.Rptr.2d 412] ["Subject matter jurisdiction involves `the court's power to hear and determine the cause' . . . ."]; Miller-Leigh LLC v. Henson (2007) 152 Cal.App.4th 1143, 1149 [62 Cal.Rptr.3d 83] [same].) It is notable that Ludwig, which along with Kong took a restrictive view of the phrase "excess of jurisdiction," concluded that "[i]f an improper plea bargain was entered, the court exceeded its jurisdiction in the traditional sense." (Ludwig, supra, 174 Cal.App.3d at p. 475.)
(5) Our analysis leads to the conclusion that we need not choose between the Bonner and Kong lines of cases. An act that exceeds a grant of statutory power qualifies under both lines of cases for writ review.

II. Discovery sanctions.

(6) No order for discovery can be made in a criminal case except as provided in part 2, title 6, chapter 10 of the Penal Code. (§ 1054.5, subd. (a).) If the prosecution does not comply with its discovery obligations under section 1054.1 or 1054.3, the trial court may make any order necessary to enforce those obligations, "including, but not limited to, immediate disclosure, contempt proceedings, delaying or prohibiting the testimony of a witness or the presentation of real evidence, continuance of the matter, or any other lawful *459 order. Further, the court may advise the jury of any failure or refusal to disclose and of any untimely disclosure." (§ 1054.5, subd. (b).) Though a trial court has discretion in these matters, that discretion is not unfettered. "The court may prohibit the testimony of a witness pursuant to subdivision (b) only if all other sanctions have been exhausted." (§ 1054.5, subd. (c).)

III. The exclusion of evidence was in excess of jurisdiction.

(7) The trial court did not consider or exhaust other sanctions before precluding the testimony of Lacy and Bodella, and any testimony from the People's witnesses regarding discovery not previously provided. In doing so, the trial court failed to heed the procedure set forth in section 1054.5, subdivision (c). We easily conclude that the trial court exceeded its jurisdiction because it lacked jurisdiction over the subject matter in the sense espoused in Edmunds and Ludwig. And certainly the trial court exceeded its jurisdiction under Bonner.
(8) Our analysis applies with equal measure to the exclusion of dog scent and gunshot residue evidence. The reason is that we decline to exalt form over substance. The undeniable impact of the trial court's order was to exclude the People from calling a dog scent expert and a gunshot residue expert. A trial court must not be allowed to indirectly do what it is barred from directly doing. Otherwise, trial courts could circumvent a lack of subject matter jurisdiction.

IV. The need for writ review versus the harassment of Mitchell.

It is our firm conclusion that the need for writ review outweighs any harassment of Mitchell. Without writ review, section 1054.5, subdivision (c) would go unenforced. Moreover, one of the express purposes of part 2, title 6, chapter 10 of the Penal Code is "[t]o promote the ascertainment of truth in trials by requiring timely pretrial discovery." (§ 1054, subd. (a).) Permitting trial courts to exclude witnesses' testimony as a sanction without first placing pressure on the prosecution to produce discovery through lesser sanctions would undermine the search for truth. Given these significant points, we conclude that it is not unreasonably harassing to force Mitchell to defend the trial court's orders in a writ proceeding. This is all the more true because Mitchell invited the error by requesting preclusion instead of lesser sanctions. And, pivotally, Mitchell will not be asked to endure a further trial or retrial.

V. Writ relief is appropriate.

The trial court's orders were issued in excess of jurisdiction, and the need for writ review outweighs any harassment of Mitchell. Under the facts of this *460 case, writ review and writ relief are appropriate. Importantly, we express no opinion as to whether the People should be sanctioned, only that if the trial court orders sanctions, it must do so within its statutory power. On remand, the trial court is free to explore appropriate sanctions. If it exhausts other sanctions and the People remain recalcitrant, preclusion of witnesses will become an option.
(9) For a contrary result, Mitchell urges us to consider People v. Municipal Court (Ahnemann) (1974) 12 Cal.3d 658 [117 Cal.Rptr. 20, 527 P.2d 372] and People v. Yarbrough (1991) 227 Cal.App.3d 1650 [278 Cal.Rptr. 703]. These opinions do not derail our conclusion. They hold that writ review is not available to challenge a trial court's discretionary rulings regarding the admissibility of evidence. They do not consider and therefore cannot bar appellate review of judicial acts which are in excess of jurisdiction. (See Bonner, supra, 104 Cal.App.3d at p. 694 [the trial court's improper "order for the production of . . . police reports was not a ruling on the admissibility of evidence" and therefore did not qualify as mere judicial error spared from writ review].) Though Mitchell contends that the preclusion orders were evidentiary rulings, we disagree. The trial court did not rule that the testimony it was precluding was inadmissible or too prejudicial. Rather, the trial court precluded certain testimony without consideration of its admissibility as a sanction for the People's failure to comply with discovery.
(10) Next, Mitchell suggests that we should deny writ review because preclusion orders are like in limine rulings. In general, in limine rulings are not binding because the trial court can reconsider, modify or set them aside. (People v. Chacon (2007) 40 Cal.4th 558, 565 [53 Cal.Rptr.3d 876, 150 P.3d 755].) As a result, they engender no prejudice. If the trial court does not later set aside in limine rulings, and if the People are unable to proceed as a result and the case is dismissed, the People can appeal. (Ibid.) We perceive no useful analogy. An in limine ruling is a permissible judicial act. In contrast, the preclusion of witness testimony as a first rather than last sanction is prohibited by statute. Review of a prohibited act is necessary to preserve the integrity of the law.
Last, Mitchell contends that the trial court exhausted all other sanctions and therefore had the discretion to preclude testimony. But in making this argument, Mitchell does not provide any record citations establishing that the trial court ever employed a lesser sanction to prompt the People to produce discovery. Instead, Mitchell notes Bean's failure to comply with numerous discovery orders and argues that the trial court was left with only one choice: preclusion. Certainly the record paints a picture of a prosecutor who often failed to appear for hearings and did not diligently provide discovery to the defense. And the trial court articulated its understandable frustration with *461 Bean on many occasions. The problem for Mitchell is that this writ proceeding is about judicial power, not judicial discretion, and we are not free to contradict a statute and perceive power where none exists.
All other issues are moot.

DISPOSITION
Let a peremptory writ issue directing the superior court to vacate the October 16, 2009 sanctions order precluding the People from presenting the following evidence at trial: (1) the testimony of Lacy, (2) the testimony of Bodella, (3) dog scent evidence, (4) gunshot residue evidence, and (5) any witness testimony regarding any information not previously provided to the defense.
Boren, P. J., and Chavez, J., concurred.
NOTES
[1]  All further statutory references are to the Penal Code unless otherwise indicated.
[2]  This argument was raised for the first time in the reply. We exercise our discretion to consider it. Mitchell filed a letter brief discussing the merits, and his attorney addressed the issue at oral argument.
[3]  Lacy is sometimes spelled "Lacey" in the record.
[4]  A review of the record reveals that Bodella is periodically identified as "Iveth Bedolla."
[5]  There may have been more comparisons. In the writ petition, the People aver: "[A]s seen from the preliminary hearing testimony a dog scent canine unit connected scent pads from the ejected bullet casings found at the murder scene with the clothing worn at the time of Mitchell's arrest."
[6]  According to the People, Bean produced background evidence concerning a handler and a dog. However, it was for the wrong dog.
[7]  We are told by the People that the trial court precluded "any evidence provided in supplemental reports regarding the murder of [Kaster]." The People ask us to reverse that order. We are not aware of any such order. For that reason, we focus only on the orders excluding the dog scent and gunshot residue evidence, and on the orders excluding witnesses. Perhaps the People refer to the trial court's tentative ruling wherein it stated: "My tentative at this point in time . . . was to preclude the use of any item that [the defense] requested in discovery to which [it was] entitled, legally entitled, which [has] not been provided at this point in time." Because this was not a final ruling, it does not factor into our analysis.
