delivered the opinion of the court.
In the original case of Annie B. Popejoy against the petitioner, the plaintiff in that action, as his wife, sought and recovered a money judgment against him for separate maintenance in the district court of Arapahoe county. Petitioner having failed to pay this judgment was subsequently cited to appear before the court rendering it, and show cause why he had not paid it, On the hearing had under this latter proceeding, the court directed that within a specified time he pay into its registry, for the use of plaintiff, the amount due on the original judgment, and that on failure to do so, he be committed to the county jail of Arapahoe county until such time as he should, or until the further order of the court in the premises. Having failed to comply with this order,- the court issued an attachment or warrant of commitment, directing the sheriff of Arapahoe county to arrest petitioner, and confine him .in jail, in accordance with such order. This writ was served in the county of El Paso, by the sheriff of Arapahoe county. Petitioner applied to this court for a writ of habeas corpus, and in his petition sets forth the facts above mentioned, and, in addition, states that at the hearing had on the return of the citation, the evidence then taken established that he was without means to pay the judgment, and *34attaches to his petition what purports to be a transcript of the testimony introduced at that hearing, and avers that at the time of his arrest, under the warrant of commitment by virtue of which he is now restrained of his liberty, he was under bond to appear before a justice of the peace in El Paso county; that for this reason he protested against his arrest by the sheriff of Arapahoe county, but was forcibly seized and taken in custody by one of the duly authorized deputies of such sheriff. The writ of habeas corpus having issued, the sheriff for return sets out the proceedings had hi the case of Popejoy v. Popejoy, and under these, justifies his restraint and imprisonment of the petitioner. The propositions advanced by counsel for petitioner are:
First. That the district court had no jurisdiction to try and determine the cause of Popejoy v. Popejoy.
Second. That if it had jurisdiction to try and determine that cause, it exceeded it by ordering the petitioner committed to prison if he failed to pay the amount named in the order entered on the proceedings had under the citation.
Third. That being under bond to appear before a justice of the peace in El Paso county, to answer a criminal charge, he could not be arrested under warrant issued by the district court of Arapahoe county.
Fourth. The sheriff of the latter county had no authority to serve the warrant under which he is now imprisoned; and
Fifth. This warrant is irregular and insufficient, for the reason that it does not appear therein, nor in the order under which it was issued, that he had willfully disobeyed the order of the court with regard to the payment of the money adjudged due the plaintiff in the original action, or that it was within his power to obey that order.
1. In support of the suggestion of counsel for petitioner, that the district court was without jurisdiction to enter the original judgment, he contends that an action for separate maintenance alone cannot be maintained by the wife against the husband. Conceding, but not deciding, that this question can be raised in this proceeding in the manner at*35tempted, it has been settled by the decisions of this court and the court of appeals that such an action may be maintained, and that the wife, in a proper case, is entitled to a judgment for separate maintenance, independent of an action for divorce (Daniels v. Daniels, 9 Colo. 133; Dye v. Dye, 9 Colo. App. 320; Hanscom v. Hanscom, 6 Colo. App. 97) ; and although the doctrine announced by the courts of this state on this subject is in conflict with decisions on the same question in some of the other states, it is fully supported by the decisions in those which have adopted the view entertained by the appellate courts in this. Bishop’s Marriage, Divorce and Separation, §§ 1398, 1399; Galland v. Galland, 38 Cal. 265; Van Arsdalen v. Van Arsdalen, 30 N. J. Eq. 359; Garland v. Garland, 50 Miss. 694; Verner v. Verner, 62 Miss. 260; Almond v. Almond, 4 Randolph (Va.), 662; Platner v. Platner, 66 Iowa, 378.
The broad ground upon which these authorities rest is, that it is the duty of .the husband to support the wife, and if, without fault upon her part, he refuses to do so, the courts will compel him to render her a reasonable support in accordance with his means, even though the wife does not seek or wish a legal separation dissolving the bonds of matrimony, and that an action for this purpose may be maintained, because of the inadequacy of ordinary legal remedies to enforce this duty. Garland v. Garland, supra. Again, the policy of the courts is to discourage, rather than encourage, divorces. The wife may be entitled to a divorce, but whether or not she will exercise that right is optional with her, and to hold that unless she did she could not maintain an action for support would be both unreasonable and unjust, for, although the conduct of the husband may be such that she could dissolve the marriage contract, he is not relieved from his duty of supporting her because she does not wish to pursue that course, and, besides, a case might arise where the husband withheld support, but not for a sufficient length of time to entitle the wife to a divorce upon that ground, and in the interim she would be *36without an adequate remedy, unless permitted to maintain an action for separate maintenance.
2. On the second proposition advanced by counsel for petitioner it is argued that the evidence taken at the hearing, when petitioner was ordered to pay the amount then due on the judgment or stand committed to jail, was insufficient to warrant that order, and, further, that in no event, whatever the showing may have been, could petitioner be committed to jail for failure to pay this judgment. The writ of habeas corpus cannot be made to serve the purpose of a writ of error, and whether or not the evidence taken at this hearing was sufficient to justify the court in committing petitioner for contempt, if he failed to pay the judgment rendered, we are precluded from examining in this proceeding. People v. District Court, 22 Colo. 422. If the trial court erred in this respect the remedy of petitioner is by a direct, and not the collateral, attack which he seeks to make by this action. Passmore Williamson’s Case, 26 Pa. St. 9. The real question involved in the second proposition is, whether or not the court had the power to commit petitioner for contempt in failing to pay the judgment rendered in the original case. That was an action in equity to enforce the rights of the wife, which, as we have seen, is maintainable, because of the inadequacy of an ordinary legal action to enforce the duty of the husband to render her a reasonable support, and no reason exists why a husband who has the ability and has been adjudged to pay a specified amount for the separate maintenance of the wife, independent of any divorce proceedings, should not be punished for contempt if he fails to pay such judgment, the same as though the judgment had been rendered in a divorce proceeding, nor does the fact that such a judgment may be enforced by execution change the rule, and we therefore conclude that the district court did not exceed its jurisdiction in directing petitioner to be committed for contempt if he failed to pay the judgment which had been awarded his wife.
In tins connection it is also urged by counsel for petitioner *37that under section 12, article 2, of the constitution, which prohibits imprisonment for debt, except in special cases, his imprisonment is unlawful. This constitutional provision against imprisonment for debt does not prohibit the punishment of a contempt in refusing to obey the lawful orders or decrees of a court; and in this case it appears that the petitioner is not imprisoned for a debt, but because of his refusal to obey the lawful order of the court with reference to the debt represented by the judgment in favor of his wife.
3. At the time of the arrest of petitioner under the commitment issued by the district court, he had not then been committed to any prison, nor was he in the custody of any officer or other person, upon any criminal or supposed criminal matter. On the contrary, he was out on bail, conditioned for his appearance before a justice of the peace of El Paso county, to answer to a criminal charge there pending; but that did not exempt him from arrest or removal by virtue of the commitment under which he is now held, and from which he seeks to be released, and the provisions of section 2115, Mills’ Ann. Stats., which provide that a person being committed to prison or in custody of an officer upon a criminal charge, shall not be removed from such prison or custody into any other prison or custody, unless it be by habeas corpus or some other legal writ, are not applicable, because, being out on hail, petitioner was not committed to prison, or in the custody of any officer.
4. The warrant under which petitioner was held by the respondent was directed to the sheriff of Arapahoe county, and was served by his deputy in the county of El Paso, and his counsel now contends that such arrest was illegal, for the reason that the authority of the sheriff of Arapahoe county"did not extend into the county of El Paso. Whether or not the sheriff of Arapahoe county was lawfully authorized to arrest petitioner in the county of El Paso is not presented for our determination. On the subject of this arrest, it appears from the averments of the petition that the only reason which petitioner urged against the authority of the sheriff of Arapahoe county *38to arrest him was, that he was already under arrest on a criminal charge then pending in the county in which he was arrested ; and this, it appears from the petition presented, is the only question which petitioner now presents for our consideration with reference to the authority of the sheriff to make the arrest. For the reasons above stated, he was not exempt from arrest or removal when taken in charge by the sheriff of Arapahoe county, and although that officer may not have had the authority to arrest him in El Paso county, and remove him (a question we do not determine), yet, inasmuch as the petitioner, according to the averments of his petition, appears to have voluntarily submitted to such arrest and removal, in so far as his objection was based upon the authority of the sheriff to act outside of his own county, he has waived the right to raise this question by voluntarily accompanying the sheriff to the county of Arapahoe.
5. The findings of the court, -and the order in pursuance thereof, entered at the hearing had in response to the citation to petitioner to show cause, to which reference is made in the warrant of commitment, as well as in the final order under which such warrant was issued, are not before us; but in their absence we must presume that the court found from the evidence then adduced that the petitioner had property with which to satisfy the judgment of his wife; otherwise, it would not have ordered him committed for contempt for failure to pay such judgment; and having failed to pay, his act in this respect constitutes a willful disobedience to the order of the court. Further, on this subject, it may be added that the court had jurisdiction of the person of petitioner at the time of the hearing under the citation; it had authority to order hixn committed if he failed to comply with its lawful orders xnade at that hearing; and having such jurisdiction and authority, its judgment in this respect, however erroneous, must be taken as legal and valid on this application until reversed or vacated by some appropriate proceeding. Passmore Williamson’s Case, supra. Or, otherwise stated, having jurisdiction of the person of petitioner and-the subject-*39matter of the action in which the order was made, committing him as for contempt, and not having exceeded that jurisdiction, its judgment is conclusively presumed to be right, until regularly brought up for revision of alleged errors in its rendition. It is not necessary, as contended by counsel for the petitioner, that the warrant must itself recite that petitioner was able to perform the act for the refusal to do which he was committed to jail. Section 330 of the code, which is relied upon as authority that the warrant must so state, is not susceptible of such a construction. It only provides that when it appears that the contempt consists in the omission to perform an act which it is in the power of the person committed to perform, he may he imprisoned until he complies with the order of the court with reference to such act, and in such case the warrant shall specify the act which he is required to perform.
We find nothing in the record before us which entitles the petitioner to a discharge under the writ, and it is, therefore, dismissed, and he is remanded to the custody of the sheriff of Arapahoe county.
Writ dismissed and petitioner remanded.