
49 Cal.2d 199 (1957)
THE PEOPLE, Appellant,
v.
JOE JOHN VALENTI, Respondent.
Crim. No. 6062. 
Supreme Court of California. In Bank.  
Oct. 29, 1957.
 Edmund G. Brown, Attorney General, Clarence A. Linn, Assistant Attorney General, and John S. McInerny, Deputy Attorney General, for Appellant.
 Henry Mariani, A. F. De Marco and E. M. De Mattei, for Respondent.
 SCHAUER, J.
 The People noticed this appeal from an order of the superior court, made in the midst of a criminal trial by jury, "dismissing ... [the] Information on the grounds of illegality of the arrest of the defendant." The order was not based upon any defect in the information or the proceedings which resulted in the filing of the information; rather, it was based upon the mistaken view that the prosecution should not continue because of the stated "illegality of the arrest." Defendant contends that the appeal should be dismissed because the subject order is not one of the orders or judgments comprehended in section 1238 of the Penal Code, which specifies the cases in which the People may appeal in a superior court criminal prosecution. The People urge that the order is appealable because it is within the language of subdivision 1 of section 1238, which provides for an appeal "From an order setting aside the ... information." We have concluded that only by improperly strained and unnatural construction of the order and of section 1238 could we hold that such order is appealable, and that in any event a reversal herein would be futile because defendant has been in jeopardy *202 within the meaning of the provision of the state Constitution (art. I,  13) which forbids double jeopardy and, therefore could not be tried again.
 Defendant was charged with felonious wagering in violation of subdivision 6 of section 337a of the Penal Code. He pleaded not guilty and trial before a jury began. Seven witnesses called by the People testified. The eighth witness called by the People was sworn and testified that he was a law enforcement officer. The prosecuting attorney asked the officer whether he had arrested defendant. Before the witness replied, defense counsel requested the court "to take a matter up in chambers." The following proceedings concerning the legality of the arrest were had outside the presence of the jury:
 The officer testified that he had arrested defendant without a warrant at night and described the circumstances which caused and attended the arrest and the incident seizure of real evidence. Without motion by or suggestion of either counsel, the judge ruled as follows:
 "The Court is going to dismiss the information. I feel there was sufficient information that, had the Sheriff's Department wanted to obtain ... a warrant ... they could have done so and then that there would have been no question as to illegal [arrest and] search and seizure ... I am dismissing the information at this time for insufficiency of the evidence, ... based on the lack of reasonableness of the arrest."
 The prosecuting attorney protested, "If your Honor please, rather than on the basis of insufficiency of the evidence, it is a question that I would like to attack on appeal since, as your Honor knows, the law is unsettled in that regard." The trial judge persisted in his mistaken views "that having chosen to arrest the man without a warrant, they did so at their peril that the evidence that was obtained might not have been admitted ... I am going to dismiss the information on that basis ... On the illegality of the arrest, that there was sufficient time to obtain a ... warrant." Defense counsel said nothing either in protest against or in acceptance of this novel procedure of "dismissing the information" on the stated grounds.
 Proceedings before the jury resumed. The judge said, "I feel ... that the case should not go to trial and there was no question to be presented to the jury and therefore the Court on its own motion dismissed the information." The jury were discharged. The minutes state that the order is one "dismissing said Information on the grounds of illegality of the arrest of the defendant." *203
 [1] There is no statutory authorization for any such action by a trial court and we know of no decision by any court of appellate jurisdiction in this state which holds or even suggests that when a defendant is illegally arrested for a public offense the illegality of the arrest permeates subsequent proceedings by which he is formally charged with the offense and tried on the formal charge. [2] This court's holdings as to and discussions of the problems of illegal arrests, searches, and seizures (in the series of cases which began with People v. Cahan (1955), 44 Cal.2d 434 [282 P.2d 905, 50 A.L.R.2d 513]) have been carefully limited to the view that evidence obtained by such unconstitutional means is inadmissible at the trial (People v. Cahan, supra, p. 444 of 44 Cal.2d; People v. Berger (1955), 44 Cal.2d 459, 462 [282 P.2d 509]) and incompetent to support an accusatory pleading (Badillo v. Superior Court (1956), 46 Cal.2d 269, 271 [294 P.2d 23]).
 [3] If the illegally obtained evidence is received at the trial and effects a miscarriage of justice a judgment of conviction will be reversed on appeal. (People v. Tarantino (1955), 45 Cal.2d 590, 595, 597 [290 P.2d 505] [judgment of conviction affirmed on count as to which admission of illegally obtained evidence was not prejudicial, reversed on counts as to which admission of such evidence was prejudicial].) [4] If the illegally obtained evidence is the sole basis of an indictment or information, defendant is held without reasonable or probable cause; his motion to set aside the accusatory pleading should be granted by the court in which he is arraigned on such pleading; and if the motion is improperly denied an appellate court will grant prohibition to halt proceedings under the accusatory pleading. (Badillo v. Superior Court (1956), supra, 46 Cal.2d 269, 271.) [5] But a defendant who has been subjected to illegal arrest, search, or seizure should not, by virtue of such illegality, gain immunity from punishment for the offense for which he was arrested or which was disclosed by the search.
 [6] Not only was the trial court mistaken in the stated belief that if a defendant was illegally arrested "there was no question to be presented to the jury"; it was also mistaken in its suggestion that where an officer has reasonable cause to believe that a defendant has committed a felony he cannot properly arrest the defendant, at night, without a warrant. (Pen. Code,  836 ["A peace-officer may ..., without a warrant, arrest a person: ... 5. At night, when there is reasonable cause to believe that he has committed a felony"].) *204
 The People suggest that because the order of dismissal was predicated upon serious errors as to the law concerning illegal arrest and illegally obtained evidence, an appeal should be allowed in order that such errors, in the interest of justice, may be corrected. [7] However, if the order is not appealable under accepted rules concerning appealability, we should not by fiat announce that it is appealable merely because it is egregiously erroneous.
 [8] Normally, the right of appeal is statutory and a judgment or order is not appealable unless it is expressly made so by statute. (Title Ins. & Trust Co. v. California Dev. Co. (1911), 159 Cal. 484, 486 [114 P. 838]; Collins v. Corse (1936), 8 Cal.2d 123, 124 [64 P.2d 137]; Peninsula Properties Co. v. County of Santa Cruz (1951), 106 Cal.App.2d 669, 675 [235 P.2d 635].)  [fn. 1] Section 1238 of the Penal Code designates the decisions in a criminal prosecution from which the People can appeal. The subdivision of that section which comes closest to being here pertinent is "1. From an order setting aside the indictment, information, or complaint." Subdivision 1 of section 1238 has been generally understood to refer to an order setting aside the indictment or information on the grounds stated in section 995 of the Penal Code, i.e., in the case of an information, on the ground "1. That before the filing thereof the defendant had not been legally committed by a magistrate" or "2. That the defendant had been committed without reasonable or probable cause." (See People v. Mitchell (1946), 27 Cal.2d 678, 686 [166 P.2d 10]; People v. Wisecarver (1944), 67 Cal.App.2d 203, 210 [153 P.2d 778]; People v. Brussel (1932), 122 Cal.App.Supp. 785, 787 [7 P.2d 403].)
 [9] In the case at hand the information was not set aside for a defect in the proceedings leading up to the filing of such information. There was nothing before the trial court when it made its order "dismissing said Information" to show whether defendant had been committed legally or for reasonable or probable cause. The effect of the order was not merely to set aside the information; it was to dismiss the action in the midst of trial. The subject of "Dismissal of the Action for Want of Prosecution or Otherwise," including dismissal "in furtherance of justice" (Pen. Code,  1385) is a subject dealt *205 with in a portion of the Penal Code (pt. 2, tit. 10, ch. 8) other than the portion (pt. 2, tit. 6, ch. 2) which concerns the setting aside of an accusatory pleading and which includes section 995, ante.
 It has often been recognized that an order dismissing an action is not within the terms of section 1238 and, therefore, is not appealable. In denying a hearing in People v. Knowles (1915), 27 Cal.App. 498, 506 [155 P. 137], this court said. "The cases in which an appeal may be taken by the people are specifically set forth in section 1238 of the Penal Code, and it is well settled that such an appeal will not lie except in a case so specified. The order here appealed from was both in form and in substance and effect one dismissing the action against this defendant. The only subdivision of section 1238 of the Penal Code, that could by any possibility be suggested as including the order before us is subdivision 1, which provides that an appeal may be taken by the people 'from an order setting aside the indictment or information.' As we have said, the order under consideration here was one granting a motion to dismiss the action. [It is to be noted that the court by this reiteration emphasized that the order in question was one dismissing the action.] The motion therefor was made on the trial, after issue joined on the merits by plea of not guilty, and was not based on any ground specified in our law as cause for setting aside an indictment, but was designed solely to prevent the further prosecution of the action ... The superior court had the power to dismiss the action, and the legislature having restricted the right of appeal by the people to certain specified cases of which this is not one, there can be no review of its action." In accord are People v. Baxter (1953), 119 Cal.App.2d 46, 49-50 [258 P.2d 1093]; People v. Morris (1953), 115 Cal.App.2d 585, 587 [252 P.2d 681]; People v. Rambout (1936), 12 Cal.App.2d 542 [55 P.2d 889]; People v. Newman (1931), 113 Cal.App. 679, 690 [298 P. 1044]; People v. Cordosco (1926), 77 Cal.App. 780, 783 [246 P. 461]; People v. Depavo (1918), 39 Cal.App. 336 [178 P. 731]; People v. Garcia (1931), 120 Cal.App.Supp. 767, 769 [7 P.2d 401].
 The People suggest that by an extension of our decision in People v. Burke (1956), 47 Cal.2d 45, 51 [4] [301 P.2d 241], we should hold that the order here is appealable. But there is an all important difference between the facts of this case and those in Burke, a difference which as is hereinafter *206 shown, sets up an unsurmountable barrier to the suggested extension. In Burke we were concerned with an order relating solely to a charge of prior conviction. Such a charge is a part of the accusatory pleading material to punishment but not to cause of action. Neither the pleading of the charge nor its disposition has any relevancy to jeopardy or the issue of guilt on the cause of action. We recognized that such charge can be "dismissed" or "stricken" or "set aside," even after trial, in the exercise of the trial court's inherent power to control the proceedings before it and in the exercise of a part of its general power, under section 1385 of the Penal Code, "either of its own motion or upon the application of the prosecuting attorney, and in furtherance of justice, [to] order an action to be dismissed." But in the case at bar it was the cause of action itself, not a mere averment relative only to punishment, that was dismissed. We did not determine in Burke that orders dismissing an action made under the exclusive authority of section 1385 are appealable. We referred to section 1385 as evidential of the broad power of the court (adverted to in People v. Knowles (1915), supra, 27 Cal.App. 498, 506) to "order an action to be dismissed" but expressly pointed out (distinguishing the controlling facts in Burke from those in Knowles) that the order under consideration in Burke related only to punishment and not to prosecution of the action or the determination of guilt. We said (p. 51 [5] of 47 Cal.2d), "The striking or dismissal of a charge of prior conviction (regardless of whether it has or has not been admitted or established by evidence) is not the equivalent of a determination that defendant did not in fact suffer the conviction [citations]; such judicial action is taken ... 'for the purpose of sentencing' only and 'any dismissal of charges of prior convictions ... does not wipe out such prior convictions or prevent them from being considered in connection with later convictions.' " As held in In re McVickers (1946), 29 Cal.2d 264, 270 [4a] [176 P.2d 40], "The so-called adjudication of habitual criminal status [dependent on prior convictions as provided for in section 644 of the Penal Code] is not and cannot be an element of adjudicated guilt, nor is it, properly speaking, a part of the judgment of conviction ... [S]tatutes which provide for increased punishment of those who have previously offended do not create specific, aggravated crimes. [5] ... That prior convictions are not elements of a substantive offense is necessarily so under the reasoning of the cases which have upheld the constitutionality *207 of section 644 against the attack that it is ex post facto as applied to convictions suffered prior to its enactment." (See also In re Rogers (1937), 20 Cal.App.2d 397, 402 [66 P.2d 1237].)
 We implicitly recognized in the Burke case that, as stated in People v. Bank of San Luis Obispo (1907), 152 Cal. 261, 264 [92 P. 481], "The right of appeal is remedial and in doubtful cases the doubt should be resolved in favor of the right whenever the substantial interests of a party are affected by a judgment." (See also People v. Draper (1933), 134 Cal.App.Supp. 787, 793 [22 P.2d 604]: "a liberal interpretation [in favor of appealability] of the terms of section 1238 of the Penal Code ... should be followed.") The order striking the allegation of prior conviction in Burke was appealable, not because it was made "in furtherance of justice," but because, as we there stated (p. 53 [8] of 47 Cal.2d), it "was in its nature one of the orders specified as appealable either by paragraph 1 or by paragraph 6 of section 1238 of the Penal Code. That statute provides that the People may appeal '1. From an order setting aside the indictment, information or complaint; ... 6. From an order modifying the verdict or finding by reducing the degree of the offense or the punishment imposed.' The trial court's action was in substance 'an order setting aside [a part of] the ... information.' " Since the Burke case order did not involve either the cause of action itself or any question of jeopardy it was clearly proper to hold, as we did, that it "was in substance 'an order setting aside [a part of] the ... information' " and, consequently, that as to appealability it should be governed by the rules applicable to orders setting aside the information rather than by those applicable to orders dismissing the action.
 [10] The order here does not purport to be one dismissing the action "in furtherance of justice," but even if we assume it to be of such character, it would not as such be appealable. The question of the appealability of such an order, made under section 1385, is discussed in People v. More (1886), 71 Cal. 546 [12 P. 631]. It is there said, "It is certainly not one of the enumerated cases in which a right of appeal is given by section 1238 of the code, and there is no other statutory provision giving such right."
 "It is contended, however, by appellant [People], that as the constitution gives this court appellate jurisdiction of questions of law arising 'in all criminal cases prosecuted, by indictment or information, in a court of record,' therefore *208 there is jurisdiction here, although no statutory machinery for the appeal has been provided, as held in People v. Jordan [1884, supra, footnote 1, ante, p. 204], 65 Cal. 644 [4 P. 683]. But the order in question is, in its nature and character, one from which the people cannot appeal. The power under which the order was made [section 1385] is substantially the same as that held by the attorney-general in England, and by the prosecuting officer in many of the American states, to enter a nolle prosequi. The court, for the purposes of the order of dismissal, takes charge of the prosecution, and acts for the people. It holds the power to dismiss, as the attorney- general in England holds the power to enter a nolle prosequi, by virtue of the office and the law; and it is exercised upon official responsibility. The court having acted for the people, and under express power granted by them to so act in their criminal prosecutions, there is no appeal on their part for such action."
 [11a] Not only does the instant case not come within the rule of any of the factual situations which have been recognized as affording the People a right of appeal but, as hereinabove suggested, a further ground--a constitutionally unsurmountable ground--precludes effective reversal. Defendant has been in jeopardy and a retrial would violate the provision of section 13 of article I of the California Constitution that "No person shall be twice put in jeopardy for the same offense."
 The situation is materially like that in People v. Garcia (1931), supra, 120 Cal.App.Supp. 767, 768-769. There a police court ordered a prosecution "Dismissed on showing of illegal entry" and the People sought to appeal. The appellate court determined that "[1] The order dismissing the action was a final termination thereof and hence within the category of judgments. [Citations.] But the statement on appeal here shows that the order or judgment of dismissal was made after the case had gone to trial before the court, a jury having been waived, and evidence had been received against the defendant. The defendant had, therefore, been placed in jeopardy for the offense charged against him. [Citation.] The order was in effect an acquittal of the charge, or at least the defendant could not again be tried upon the charge by reason of our constitutional provision against double jeopardy for the same offense. (Const., art. I,  13.) Statutory provisions for appeals by the People will not be construed to extend to such cases. [Citations.]" *209
 [12] The purpose of the constitutional provision against double jeopardy is to prevent repeated harassment of a defendant upon a charge of the same offense. Certainly this purpose is subserved by refusing to permit repeated retrials of a defendant in order to remedy errors of law such as those here made by the trial court in the course of trial. [13] As was held in People v. Webb (1869), 38 Cal. 467, 479- 480, "a person once placed upon his trial before a competent Court and jury, charged with his case upon a valid indictment [or information or complaint], is in jeopardy, in the sense of the Constitution, unless such jury be discharged without rendering a verdict, from a legal necessity, or for cause beyond the control of the Court, such as death, sickness or insanity of some one of the jury, the prisoner or the Court, or by consent of the prisoner; and if such jury render a verdict or be discharged before a verdict, without such legal necessity, controlling cause or consent, the prisoner is forever protected from a re-trial upon the same or any other indictment for the same offense, unless, at his instance, the verdict be set aside or judgment be reversed."
 [11b] Since jeopardy has attached, we could not properly order a retrial; therefore, a reversal of the order from which the People purport to appeal would be useless. (People v. Hill (1905), 146 Cal. 145 [79 P. 845] [order affirmed]; People v. Roberts (1896), 114 Cal. 67, 69 [45 P. 1016] [order affirmed]; People v. Matiasevich (1936), 12 Cal.App.2d Supp. 759, 761 [55 P.2d 942] [appeal dismissed].)
 For the reasons above stated, the appeal is dismissed.
 Gibson, C.J., Shenk, J., Carter, J., Traynor, J., Spence, J., and McComb, J., concurred.
NOTES
[fn. 1]  1. We have here no question of the qualification that the Legislature, by failure to enact rules providing for appeals (People v. Jordan (1884), 65 Cal. 644, 648 [4 P. 683] or by enactment of procedural rules which purport to limit or destroy rights to appeal (In re Sutter-Butte By-Pass Assessment (1923), 190 Cal. 532, 536-537 [213 P. 974]), cannot affect appellate jurisdiction conferred by the state Constitution.
