
239 S.W.2d 480 (1951)
HARROD
v.
WHALEY, Warden.
Court of Appeals of Kentucky.
May 11, 1951.
*481 Otis Harrod, Pro se.
A. E. Funk, Atty. Gen., Walter C. Herdman, Ass't Atty. Gen., for appellee.
STANLEY, Commissioner.
The special circuit judge dismissed the petition for a writ of habeas corpus of Otis Harrod, a prisoner in the reformatory at LaGrange, upon the face of the papers. The petitioner was convicted in the Jefferson Circuit Court of the crime of breaking and entering a storehouse and his penalty fixed at life imprisonment under the Habitual Criminal Act. KRS 433.190, 431.190. We affirmed. Harrod v. Commonwealth, 311 Ky. 810, 226 S.W.2d 4. A writ of certiorari was denied by the Supreme Court. 339 U.S. 915, 70 S.Ct. 562, 94 L.Ed. 1341. Authenticated copies of the indictment, instructions and judgment of conviction were not filed with the petition, but purported copies of those documents and of the testimony of a deputy circuit clerk of Jefferson County were referred to and attached to a brief filed with the circuit judge. Nevertheless, in view of the jealous regard for the individual rights of a citizen to invoke this venerated proceeding to test the legality of his detention, the judge considered them. We shall be as patient. Liberality rather than strictness should control in entertaining and considering an application for a writ of habeas corpus. 39 C.J.S., Habeas Corpus, § 82. Harrod appears pro se. He insists that many of his constitutional rights were violated.
It seems to be his contention that he has been denied due process because the judge did not issue the writ directing the prison warden to bring him before the court and then hear evidence upon the merits of the grounds alleged as a right to be released from custody.
The Criminal Code of Practice, Sec. 399, requires the issuance of the writ upon a petition which shows "probable cause to believe [the petitioner] is [being] detained without lawful authority, or is imprisoned when by law he is entitled *482 to bail." This is in accord with the judicial concept that habeas corpus is not a writ of course but is one of right only when probable cause for an inquiry is shown by the statement of facts prima facie. If the petition is insufficient in this respect, it is subject to demurrer or to a sua sponte denial by the judge. Furthermore, the issuance of the writ is generally within the discretion of the judge to whom application is made. Commonwealth v. Gordon, 197 Ky. 367, 247 S.W. 45; Commonwealth ex rel. Meredith v. Smith, 274 Ky. 202, 118 S. W.2d 538. The petitioner could not have benefited more by proving what the documents filed revealed. We, therefore, examine the petition, waiving, as we have indicated, the irregularities in the matter of filing attested copies of the judicial documents which, it is charged, show such a defect or departure from true justice as entitled the petitioner to the relief asked.
Basically, the asserted defect is in the indictment insofar as it charges two previous convictions of felony upon which his punishment of life imprisonment rests. The indictment properly charges Harrod with the commission of the crime of breaking and entering into a storehouse with an intent to steal property therefrom. It further charges that in May, 1936, he was convicted of grand larceny and upon the same day was convicted of another case of grand larceny; also, that in June, 1939, he was convicted of malicious shooting with intent to kill. The instructions followed the form of the indictment. The testimony of the deputy circuit clerk was in accord. The indictment did not charge that any two of the crimes was committed in sequence after conviction of a previous one, nor that the principal crime of storehouse breaking was committed after both judgments of conviction were rendered. We have held that before a person may be subjected to the enhanced penalty provided in the statute, it must appear that each commission and conviction consecutively followed the preceding one, i. e., that it is a prerequisite that each prior crime was committed after a preceding judgment of conviction and all preceded the commission of the principal offense charged in the indictment. This is because the statute is aimed at persons who persist in defying the law and authorizes greater punishment for their criminality. Morgan v. Commonwealth, 170 Ky. 400, 186 S.W. 132; Cobb v. Commonwealth, 267 Ky. 176, 101 S.W.2d 418; Coleman v. Commonwealth, 276 Ky. 802, 125 S.W.2d 728. Therefore, the indictment was defective with respect to charging the defendant, Harrod, with being an habitual criminal and did not authorize the instructions under which he was given a life sentence. Allen v. Commonwealth, 272 Ky. 533, 114 S.W.2d 757; Hendrickson v. Commonwealth, 314 Ky. 464, 235 S.W.2d 981. It must be conceded that these irregularities would have entitled the defendant to a reversal of the judgment of conviction which was affirmed as stated, but they were only irregularities or errors which at most rendered the judgment erroneous and not void. These errors were available on the appeal of the petitioner from the judgment of conviction and were not pointed out or relied upon. Under well settled authority we must deem them as having been waived. In any event, the errors cannot be reviewed in a habeas corpus proceeding. Department of Public Welfare v. Polsgrove, 250 Ky. 517, 63 S.W.2d 603; Sexton v. Buchanan, 292 Ky. 716, 168 S.W.2d 19. The office or purpose of the writ of habeas corpus is not to review errors committed in the trial. It is a collateral attack upon the judgment. It raises only the question whether the judgment under which the petitioner is confined is absolutely void. It may be void by reason of the omission of due process, want of jurisdiction of the court which tried him, and that in turn may be because the indictment did not charge the commission of a public offense as where there was no such offense cognizable in law or where the statute is unconstitutional, hence, is no law at all. Department of Public Welfare v. Polsgrove, supra, 250 Ky. 517, 63 S.W.2d 603; Smith v. Henson, 298 Ky. 182, 182 S.W.2d 666; 25 Am.Jur., Habeas Corpus, §§ 28, 29. The indictment in the instant case did charge a public offense. It was defective only in that part which permitted the infliction of the more severe penalty as above outlined.
*483 The appellant seems to understand this limitation of his right to the writ for he submits that the statute is unconstitutional and that by the denial of the writ he has been denied the right of equal treatment under law.
The constitutionality of our statute, like those in other states, has withstood attack upon various grounds. It is a valid law. Allen v. Commonwealth, supra, 272 Ky. 533, 114 S.W.2d 757. The appellant was convicted by due process of law; in fact, by all the processes which the Constitution and statutes provide, and his claim on this account is without merit. Stonefield v. Buchanan, 289 Ky. 386, 158 S.W.2d 970.
The argument of a denial of the right to equal protection of the law is that there was discrimination between himself and others who may have been or may be properly charged to be within the terms of the habitual criminal statute. KRS 431.190. The argument fails to recognize that the provision for enhanced punishment of life imprisonment is not an element or ingredient of the particular crime with which the accused is presently charged or of any of those of which he has been heretofore convicted. The charge is that the accused is of that class of incorrigible criminals who deserve to be more severely punished than a first or second offender. When the defendant is proved beyond a reasonable doubt to belong to that class, the jury may impose the severer punishment for the commission of the principal or last crime. McIntyre v. Commonwealth, 154 Ky. 149, 156 S.W. 1058. Thus, it was held in that case that where one had been so charged but the jury merely imposed only the penalty prescribed for the particular crime and ignored the charge of belonging to the habitual criminal class, that charge could be again lodged against him in a fourth indictment without violating his right not to be put in jeopardy twice for the same offense. Claims of denial of due process of law and of equal protection of laws upon several theories have been consistently shown to be without merit. Annotations, 58 A.L.R. 26 et seq.; 82 A.L. R. 349 et seq.; 116 A.L.R. 213 et seq.; 132 A.L.R. 94.
It appears a writ of habeas corpus has been denied by the United States District Court and of coram nobis by the Jefferson Circuit Court.
The trial judge properly denied the writ, and the judgment is affirmed.
