Per Sanderson, J.:
The return shows that on the 20th of March, 1868, one Alfred Briggs recovered a judgment in the District Court of the Sixth Judicial District, against the petitioner arid others, for the sum of three thousand six hundred and twelve dollars and twenty-eight cents, with costs taxed at six hundred and forty-five dollars and twenty-five cents, and that the same has never been reversed or modified, nor satisfied that on the 23d of March, 1868, Briggs caused an execution to he issued upon said judgment, directed to the Sheriff of Sutter County; that on the 15th day of May, 1868, Briggs made an affidavit before the Judge of the Sixth Judicial District, showing that the petitioner had certain property which he *99refused to apply to the satisfaction of said execution, and that thereupon said Judge made an order requiring the petitioner to appear before a referee appointed for that purpose, at a time and place therein specified, and answer touching his property; that the petitioner appeared before the referee at the time and place appointed, and, upon examination, stated that on the 6th of July, 1868, he deposited with the Pacific Mutual Life Insurance Company the sum of two thousand nine hundred and thirty-three dollars, in United States gold coin, and took from said company an agreement of that date, called an Endowment Policy, whereby said company agreed to pay to him, or his assigns, on the 6th day of July, 1878, or sooner if he should die before that time, the sum of three thousand five hundred dollars, together with such dividends as may have accrued to him in the meantime, and that said policy was then in his possession; that, thereupon, the referee made an order directing the petitioner to deliver said policy to the Sheriff as property to be sold by him and applied in satisfaction of said judgment; that petitioner refused to obey the order of the referee, and that, thereupon, the latter reported his proceedings fully to the Judge of the Sixth Judicial District, and the refusal of the petitioner to obey his order; that, thereupon, the Judge of the Sixth Judicial District made an order, requiring the petitioner to show cause before him, at a given time and place, why he should not be adjudged guilty of contempt and be proceeded against accordingly; that the proceedings had under this order resulted in a judgment declaring the petitioner guilty of contempt in not obeying the order of the referee; and it further appearing that said endowment policy was still in the possession of the petitioner, it was further ordered that he be confined in the County Jail of Sutter County until he should obey the order of the referee by delivering said policy to the Sheriff of said county; that the proper process was accordingly issued, and that the petitioner is now in the custody of the Sheriff* of Sutter County, under and by virtue thereof.
*100It is claimed by counsel on the part of the petitioner that the endowment policy in question is exempt from execution under a statute of this State passed at the last session of the Legislature, (Stats. 1867-8, p. 500,) and hence, that' the order of the referee, requiring the petitioner to deliver it to the Sheriff, was null and void, and for that reason the petitioner is unlawfully restrained . of his liberty within the meaning of the first subdivision of the twentieth section of the statute in relation to the writ of habeas corpus, which provides that when a person is in custody by virtue of process from any Court of this State, or Judge or officer thereof, he may be discharged if it appears that the jurisdiction of such Court or Judge or officer has been exceeded.
Habeas corpus is undoubtedly the proper remedy for every unlawful imprisonment, both in civil and criminal cases; but an imprisonment is not unlawful in the sense of this rule merely because the process or order under which the party is held has been irregularly issued, or is erroneous. Process which has been irregularly issued may be set aside by the Court or officer by whom it was issued, and erroneous judgments and orders may be reversed on appeal or writ of error. The writ of habeas corpus has not been given for the purpose of reviewing judgments or orders made by a Court, or Judge or officer acting within their jurisdiction. To put it to such a use would be to convert it into a writ of error, and confer upon every officer who has authority to issue the writ appellate jurisdiction over the orders and judgments of the highest judicial tribunals in the land. County Judges, though occupying an inferior position, and exercising an inferior jurisdiction, would be, by such a rule, empowered to review and practically reverse the judgments and orders of the District Courts, and of the Supreme Court itself, and also of the Federal Courts exercising jurisdiction within the State. Establish the doctrine that the judgments and orders of Courts may be reviewed on habeas corpus, upon the ground of error, and appeals for the correction of errors may be dispensed with in all cases in which the arrest or imprisonment of persons *101is allowed. Every criminal action, every civil action in which an arrest is given, and every proceeding for a contempt, could be brought to the Supreme Court by writs of habeas corpus. Hot only that, but, as already suggested, inferior tribunals would be called upon to review the judgments of superior tribunals, and tribunals of equal grade to interfere and review each other’s proceedings. Such a rule would render all judicial proceedings amorphous, and lead to the utmost confusion and disorder. It is well settled that habeas corpus can be put to no such use, and that its functions, where the party who has appealed to its aid is in custody under process, do not extend beyond an inquiry into the jurisdiction of the Court by which it was issued, and the validity of the process upon its face. (People v. Cassels, 5 Hill, 167; People v. Sheriff of New York, 7 Abbott, 96; Ex parte Gibson, 31 Cal. 619.)
The order requiring the petitioner to deliver the policy in question to the Sheriff was made in the regular course of proceedings, authorized by the statute, supplementary to execution. By the statute, (Practice Act, Chap. H,) the Judge of the Sixth Judicial District was authorized to institute an inquiry as to the property of the petitioner in the mode which he adopted, and to subject all the property which might be discovered, not exempt from execution, to the satisfaction of the judgment in favor of Briggs. To that end he necessarily had jurisdiction to determine whether the property found in the possession of the petitioner was or was not exempt from execution. Such was the subject matter with which he had to deal. That he had jurisdiction to deal with it, cannot be questioned. That he had jurisdiction over the person of the petitioner, is not denied. Such being the conditions, his order directing a surrender of the policy may be erroneous, but it cannot be void. Whether it is erroneous or not, I am not allowed to inquire while acting under this writ. My power extends no further than to declare whether his order is void for the want of jurisdiction, or his process, upon its face, invalid. In my judgment, his *102order is not void, nor Ms process invalid. If the petitioner is dissatisfied with the order, he must seek a reversal in some other mode. The present writ is not the proper remedy. The petitioner is remanded.