delivered the opinion of the Court.
It becomes necessary in this case to determine the question whether the bonding of tbe boat was a discharge of the lien by virtue of which she was seized at the suit of tbe appellant. But for the giving of the bond, the boat would have been held in the custody of tbe ofñeer who seized her. While in that situation there would be little or no occasion for contracting debt on her account. When she is freed from arrest and employed in navigation, the want of supplies is daily recurring, and the policy of the law in allowing debts of a certain class to he liens, is subserved by discharging the liens for which a boat has once been seized.— The consideration which influenced the law maker in giving liens for certain debts in marine navigation, influenced our Legislature in allowing liens on boats. Bottomry bonds are evidences of debt contracted by the master in a foreign port for obtaining necessary supplies when the owner has no resources or credit. The lien of the last bottomry bond is preferred to that created by one of a previous date. Steamboats, like sea vessels, “were made to plough the waters and not to rot by the wall,” and to effect this end, the laws make them subject to liens. A boat may have contracted debts to a large amount, and after being seized for those debts, to permit her again to be employed in navigation, subject to *298their liens, would be the means of deceiving those who might be willing to give her credit, if the fact was unknown, and if known, would disable her from obtaining it.
The condition of a bond given for the purpose of releasing a boat detained for debt, is, that the obligors shall satisfy the amount which shall be adjudged to be owing and due the plaintiff, together with costs. There is nothing said about the return or delivery of the boat. If it was intended that the boat should be sold for the debts for which she had been seized, there would have been a stipulation for returning her to satify the judgment of the court. When a boat is not bonded, judgment is given that she be sold to satisfy the debt for which she was seized; if she is still liable to be sold after being bonded, should.not the same judgment be rendered, notwithstanding the liabilities of the sureties ? The case of Evans vs. King, 7 Mo. R., 411, in which it was held that the giving of a bond for the forthcoming of property seized under an attachment, is not a discharge of the lien created by a levy of the attachment, is not an authority in support of the position that the giving of the bond under the act concerning boats and vessels, is not a discharge of the lien on the boat. The principal ground of the decision in the case of Evans vs. King, was, that a mode was prescribed by the law regulating attachments, for their dissolution, and the manner of effecting this, being expressly pointed o ut, it would be unwarrantable to infer that effect from a bond under another provision of the law devised for another purpose.
If the liens were discharged, the judment which condemned the boat to be sold was erroneous, and the appellant stands in the position of one whose debt has been paid by the property of another. Under such circumstances, an action for money had and received would lie to recover the amount received. This, action however, is, in form, trespass.— We cannot perceive the principle on which a party to the record can be made liable in trespass for an erroneous judgment or award of execution emanating from a court of record having jurisdiction of the subject matter. This is not the case of taking the property of one to satify the execution of another. The identical property sold in this case, was condemned by the court to sale, and process issued for the purpose. The owner of the boat being no party to the proceeding, he could not reverse the judgment on appeal or writ of error. He might, no doubt, have, by application to the court, arrested the execution of the process. By the-parties to the record only, an erroneous judgment may be reversed.— Irregular process of a court of general jurisdiction, will justify an officer *299or party, until it is set aside on motion. Barker vs. Braham & Norwood, 3 Wilson, 368.
The action is, in form, trespass, and not guilty is the only plea in the case. The justification was not admissible under that plea. The judgment therefore must be affirmed. This course is calculated to do justice between the parties. The plaintiff is entitled to recover the value of his property sold, and as the objection to his recovery is the misconception of the form of his remedy, there is no hardship in holding the defendant to a strict compliance with the forms of pleading.
The other Judges concurring,the judgment will be affirmed.