This action is against Bird, for having illegally discharged a debtor arrested on a ca. sa. at the suit of the plaintiffs, and brought before him as judge of the county court, upon a writ of habeas corpus.
By the 2d section of the 12th chapter of the Penal Code, it is enacted, that “whenever oath shall be made before any justice of the peace, clerk of the circuit -or county court, or before any judge or chancellor, that any free person is detained, or held in illegal custody, in any place, other than the penitentiary, or the common goal of the county, it shall be the duty of such justice of the peace, clerk, judge or chancellor, to issue a writ, directed to the sheriff or coroner, commanding him to take into his custody, the person so alleged to be illegally detained or confined, and forthwith to have him before the judge of the county court, or some judge of the circuit, court, or some chancellor, as may be most convenient; and such judge or chancellor, shall examine into the cause of the detention, and if the same is illegal, shall discharge the person so detained; if otherwise, he shall by warrant in writing, commit the person to the proper custody. [Clay’s Digest, 462, § 2.] By the succeeding section, the power of the judge of the county court is extended to all cases whenever any person is confined in the county jail on any cause whatever, other than a commitment for, or a conviction of felony, or by sentence or decree of the circuit court, or court of chancery. [Ib. § 3.] '
By a subsequent section, it is very distinctly pointed out, that a prisoner, by virtue of civil process, shall only be discharged in one of the following cases: 1. -When the jurisdiction of the court has been exceeded, either as to matter, place, sum or person; when though the original imprisonment was lawful, yet by some act, omission or event which has subsequently taken place, the party is entitled to his discharge. 2. When the process is defective in matter of substance, rendering such process void.— 3. When the process, though in proper form, has been issued in a case not allowed by law. 4. When the person having the custody of the prisoner under such process, is not the person empowered by law to detain him. 5. When the process is not au-*836thorised by any judgment, order or decree of any court, nor by any provision of law. [Ib. 468, § 39.]
From these enactments, it will be perceived that the judge of the county court is, by law, invested with the authority to issue the writ of habeas corpus, in all cases where the detention is claimed by virtue of civil process; and that he is also constituted the judge to determine upon its legality in every aspect in which it can be presented. It results that a mistaken exercise of judgment, is not a matter for which he can be called on to answer, either civilly or criminally.
Citations of authorities for this are unnecessary, for it is one of the cardinal .maxims of the law.
There is, therefore, no error in the judgment of the court below, and its judgment is affirmed.