A writ of habeas corpus cannot be made a substitutes) for an appeal or writ of error.—Ex parte Haley, 1 Ala. App. 528, 56 South. 215.
The petitioner was charged with a violation of an ordinance of the city of Troy,-, the' specific offense with which he was charged being petit larceny, which, by an ordinance, is made an .offense against-the city. He was fined’$15 and costs, and as additional' punishment was *223sentenced to hard labor upon the streets of the city. The judgment was irregular in that the defendant, not having paid the fine and costs, should have been sentenced to hard labor for their payment; but this irregularity did not render the sentence to hard labor for 60 days as additional punishment void.—Ex parte Haley, 1 Ala. App. 528, 56 South. 245.
To successfully attack a judgment collaterally — and the present proceeding is a collateral attack — the judgment must be illegal and void, and not merely irregular or erroneous.—Davis v. State, 153 Ala. 73, 45 South. 164; Towery v. State, 143 Ala. 61, 39 South. 310.
“The general principle, then, prevails, that when a record or process is collaterally assailed, it must be for illegality, not for error or irregularity. * * If the jurisdiction had not attached — if the process or judgment is, therefore, without authority of law — it is not only irregular, but illegal. But if jurisdiction has attached, and there is a departure from, or neglect to observe, the prescribed mode of procedure, the process or judgment is merely irregular. However gross may be the irregularity, the correction of it is not the function of a writ of habeas corpus prosecuted under the statute.”—Kirby v. State, 62 Ala. 54; Ex parte Merlet, 71 Ala. 373; Ex parte Pearce, 111 Ala. 99, 20 South 343.
It is a familiar principle of the law that there can be no conviction of a felony when there is no evidence tending to establish the corpus delicti except upon a judicial confession of the defendant. Nevertheless it has been held that, even on appeal, the fact that there was no evidence tending to establish the corpus delicti in a criminal prosecution, unless the record presents that fatal-defect in the evidence in some appropriate way for review, cannot avail the defendant.—Woodson v. State, 170 Ala. 87, 54 South. 191; Jones v. State, 2 Ala. App. *224240, 57 South. 62. Certainly if, on an appeal in such a criminal case, an appellate court, under such circumstances, cannot aid a defendant then no court can, upon a collateral attack— as upon a petition for a writ of habeas corpus — declare a judgment of a competent tribunal void for this reason.
The affidavit and warrant charged the petitioner with the violation of a valid ordinance of the city of Troy. When the defendant was placed upon trial, the recorder, under the law, had jurisdiction of the offense with which the petitioner was charged and of the petitioner himself. If the evidence disclosed that the petitioner was not guilty of petit larceny, hut of grand larceny, and the recorder, in the teeth of the evidence, convicted the petitioner of petit larceny — if, as claimed by the petitioner, there was a variance between the allegations and the proof — the law furnished him with a remedy. He had the right to appeal to another court, where, under the law, he could and would have obtained a trial de novo and thus have obtained relief. Having failed to do this, he cannot be heard, by parol evidence, to impeach, in a collateral proceeding, a judgment which the recorder had the jurisdiction to render. If such a proceeding was available, thé judgments of courts would be of little value. While irregularities appear upon the face of the judgment, these irregularities do not render the sentence of the defendant to hard labor upon the streets of Troy for 60 days void.—Ex parte Haley, supra.
The judgment of the court below is affirmed.
Affirmed.