delivered the opinion of the court.
Morgan sued Myers by warrant before a justice of Marshall county, for a demand less than $20. Myers relied on a set-off exceeding that sum, and asked judgment over. The justice awarded a judgment against the latter for $8 65, and from that judgment he appealed to the quarterly court. The judge of that court, having first granted the appeal, after-wards, on motion of the appellee, dismissed it for ‘want of jurisdiction, and subjected the appellant to costs.
The appellant then., by proceedings in the circuit court, prayed for and obtained a peremptory mandamus against the judge of the quarterly court compelling him to reinstate the case upon his docket, and to hear and determine the same, and from that order Goheen, the judge of the quarterly court, has appealed.
We are of opinion that the mandamus should have been denied, and that the circuit court erred in allowing it.
The writ of mandamus, as defined by the Civil Code, {sec. 526,) “is an order of a court of competent and original jurisdiction, commanding an executive or ministerial officer to perform an act, or omit to do an act, the performance or omission of which is enjoined by law, and is granted on the motion of the party aggrieved, &c.” And this is substantially the common law definition.
The doctrine, with regard to the description of cases in which this writ is not allowable, is, that it should generally be refused where the applicant has some other appropriate remedy; and always denied *427when asked for to compel a judicial officer to do, or abstain from doing an act, about which he can exercise a judicial discretion. (Bacon Abr. Mandamus, 436; 3 Black Com. 110; 2 Strange, 881; 19 Johnson, 260; 5 Wendell, 122.)
2. A sued B by warrant before a justice for a demand less than $20; B relied on a set off exceeding that sum, and claimed judgment over; the justice rendered judgment against B for $S 65; B appealed; the quarterly judge granted the appeal, but after-wards dismissed it for want of jurisdic t i o n.— Held, that it was error in the circuit court to award the writ of mandamus, for the reasons that B had the right to an appeal to the circuit court, (sec. 20,) and the dismissal of the appeal was a judicial determination.Upon either ground the writ in this case should have been refused.
The applicant had an appropriate remedy by appeal to the circuit court from the dismissal of his appeal by the quarterly court.' The matter in controversy, arising on his set-off, was twenty dollars and more, and, in such cases, an appeal is expressly allowed by the Civil Code. (Sec. 20.)
The dismissal of the appeal for want of jurisdiction was the judicial determination of a question incident to every judicial proceeding, It was properly raised by motion, and its decision, though preliminary to any adjudication on the merits, was indispensable, and altogether within the judicial power and discretion of the court. The judge in passing upon the question of jurisdiction was obviously acting in a judicial and not ministerial character, and, in such case, as already stated, a mandamus will not lie against him for the correction of his judgment, however erroneous it may be.
The judgment is reversed, and cause remanded with directions to dismiss the petition.