This action is assumpsit on a note given by the defendant for the amount of several fines and costs, to which the defendant was sentenced by the plaintiff, acting therein as a magistrate.
Upon the case stated, the court are of opinion, that the plaintiff cannot recover. There was no consideration moving from the plaintiff personally, because he was acting in a judicial capacity, and could have no personal interest, either in committing or discharging the defendant. Nor could he take a note as trustee for the county or the commonwealth, for want of authority.
But a more important ground of defence is, that the consideration was illegal, being in violation of a public duty. The object of the law is to punish its violation; and the mode specially provided is by the actual payment of a fine, to be enforced by immediate imprisonment, until its payment : or by imprisonment for a term of time prescribed by the sentence. Harris v. Commonwealth, 23 Pick. 280. This case *580is quite distinguishable from that of Beely v. Wingfield, 11 East, 46, cited in the argument; that was a note given to parish officers, at the recommendation of the court, as an indemnity for expenses personally incurred by the parish.
But such a proceeding as this is entirely contrary to public policy. If a magistrate, or any other judicial officer, could enter into a negotiation with a convict, take a contract to himself, and enforce it by law, it would operate as a temptation to the judge, and lead to the oppression of the accused by the use of public process. If the judge might take a note with surety, he might take a pledge of personal or a mortgage of real estate, or make any other contract in his own name. It would, we think, lead to complicated relations between ministers of the law, and parties accused, entirely inconsistent with the purity, simplicity and directness which should ever characterize the administration of the criminal law.