Sherwin, J.
The plaintiff in this action be'came the owner of a certain stock of goods consisting of fruit, confectionery, etc., by purchase from one Albert Gramas. At the time of the sale and transfer of said stock to the plaintiff, Gramas was indebted to the Lagomarcino Grupe Company and to several other dealers in his line. After the plaintiff had been in possession of the stock so purchased for some time, the defendant Lagomarcino Grupe Company brought suit against Gramas on their own claim, and on others that had been assigned to them, and sued out a writ of attachment, which was levied on the stock in possession of the plaintiff, Constantine. Constantine served notice of his ownership of the stock on the sheriff, Evan Rowland, one of the defendants herein, and thereupon the sheriff demanded and received from Lagomarcino Grupe Company an indemnifying bond. A day or two after the indemnifying bond had been furnished, the plaintiff herein, Constantine, executed a delivery bond, and the stock was thereupon surrendered to him. The levy deprived him of possession only about three days. Thereafter Constantine intervened in the original attachment suit, claiming that he was the owner of the attached property. Trial was had on the issues joined, and it was determined in favor of Constantine, and the levy was discharged. Soon after that action had been disposed of, Constantine brought suit against the present defendants on the indemnifying bond. Still later he filed a substituted petition making the sheriff, Rowland, and the Lagomarcino Grupe Company defendants, and asking judgment against them for damages for trespass. The said defendants answered, and the ’ case weut to trial. At the close of the plaintiff’s evidence defendants moved for a directed verdict on the ground of misjoinder of causes of action and of parties. The motion was sustained as to the defendant Rowland, and the action was dis*145missed as to him. After this ruling had been made, the plaintiff asked leave to amend and sue on the indemnifying bond, with the sureties thereon as parties defendant. Plaintiff was permitted to so amend and sue, and he immediately filed an amendment to his substituted petition declaring on the said bond. The Lagomarcino Grupe Company then moved to strike the amendment and to dismiss for the reason that it presented an entirely new cause of action, and for the further reason that the Grupe Company was a nonresident of Johnson County, and the court had no jurisdiction of said company. The motion also asked that in the event of its being overruled the case be continued. The case was continued, but no ruling was made on the motion to strike and dismiss. Thereafter all of the defendants answered, and the case was tried, resulting in a judgment of $1,125 for the plaintiff.
_ non-eesÍden? defendant, The first proposition argued by the appellants is that • the court was in error in not dismissing as to the Lagomarcino Grupe Company upon motion, after there had been a ■ dismissal as to the sheriff, Lowland. Section 3502 of the Code provides that, where an ac-^011 £g aggj[ns^ several defendants, some of whom are residents and others nonresidents of the county, and the action is dismissed as to the residents, such nonresidents may, upon motion, have said cause dismissed. This provision of the statute is plain enough; and, where the condition therein stated exists, there can be no question as to the right of the nonresident defendant to have the suit against him dismissed. But before he can insist upon such a dismissal, he must show to the court that he is a nonresident defendant. There was no showing of the kind made in this case.
*146?. Evidence: judicial notice: pleadings. *145It is true, in the attachment suit, that Lagomarcino Grupe Company alleged that it was a corporation resident of Linn County, 'and the appellants say that the trial court should have taken judicial notice of the pleadings in that *146case. There may be cases so closely interwoven, or so clearly interdependent, as to invoke such a rule. But this is not one of that class of cases. The present suit was wholly independent of the attachment suit so far as the pleadings were concerned. It was conceded in this case that the levy had been made and the stock taken thereunder. There was no issue between the Lagomarcino Grupe Company and Gramas, the defendant in their* action, and this plaintiff was not concerned about the pleadings in that case, nor could he be in any way bound or affected thereby. The cases were therefore entirely separate and distinct, and the trial judge in this case could not take judicial notice of a statement made in the petition in the attachment suit. 16 Cyc. 918 (c) & (d).
3. Misjoinder of parties: waiver of objection. An original misjoinder of parties defendant is of no moment now, because after the amendment instituting the present action, all defendants voluntarily answered.
4. Attachment: exemplary damages: liability therefor on indemnifying The court instructed that the plaintiff would be 'entitled to exemplary damages if it was found that the levy was made willfully, maliciously, and without reasonable grounds for believing that the goods levied upon were the property of Albert Gramas, or, if it was found that the holding of said goods after the levy was willful and malicious. The actual damage proven was small, and the verdict shows beyond question that a large sum was allowed as exemplary damages. The appellants contend that such damages may not be recovered in a suit on an indemnifying bond, given to the sheriff or other officer who makes the levy, in accordance with the provisions of sections 3991 and 3992 of the Code. Section 3991 makes it the duty. of an officer to levy on any personal property on which the plaintiff directs him to levy, ■ unless he has received notice in writing that such property belongs to *147some other person. It further says: “Or, if after the levy he receives such notice, such officer may release the 'property unless a bond is given as provided in the next section; but the officer shall be protected from all liability by reason of such levy until he receives such written notice.” Section 3992 provides that, after the officer has received the notice referred to in the preceding section, he may require an indemnifying bond from the plaintiff, and that such bond may be given to the effect that the obligors will indemnify the officer against “the damages which he may sustain in consequence of the seizure or sale of the property, and will pay to any claimant thereof the damages he may sustain in consequence of the seizure or sale. . . . and thereupon the officer shall proceed to subject the property to the execution, and shall return the indemnifying bond to the court from which the execution issued.”
It will be noticed that the bond provided for is to be conditioned to indemnify the officer, or claimant of the property, against the damages which he may sustain in consequence of the seizure or sale. The primary object of the statute is to compel the officer to levy on property that is pointed out to him by the attaching plaintiff, and to pro'teet him from liability for so doing. Cousins v. P & G. Co., 122 Iowa, 465; Cheadle & Zangs v. Guittar, 68 Iowa, 680. And, the officer being compelled to make a levy and to hold the property when a bond has been given, it is self-evident that he can not be made liable for exemplary damages for such acts alone. If such damages may be recovered from him at all, they must arise from some act outside of the line of his duty as 'an officer, and for such act the attaching plaintiff would not be liable unless he was in some way a party to it. 13 Cyc. 114.
*1485. Same. *147If the officer who makes the levy or holds the property under the positive requirements of sections 3991 and 3992 can not be held liable for exemplary damages, it must *148logically follow that section. 3992 does not provide for or authorize a recovery on the bond for anything more than the actual damages which have been suffered in consequence of the levy, and hence when full compensation is made therefor, there is no further liability on the bond. It is also manifest that a claimant of the property can have no greater rights under the statute in question than the officer. It being one of the primary objects of the statute to protect the officer against the actual damage sustained by him, we think it must follow that no broader protection is given to the claimant of the property. Exemplary damages are not compensatory in the ordinary sense. Sneh damages are usually given as a punishment to the offender, for the benefit of the public, and to prevent similar acts. It is a general rule also that exemplary damages are not recoverable on an indemnifying bond unless expressly so provided by the bond or by statute. 13 Cyc. 116.
6. Same. If the claimant of attached property elects to bring a suit to recover damages on a bond of indemnity given to the officer, he can only recover the damages provided for in the bond and statute authorizing it. And . . .. such damages are generally compensatory only as to the principal, as well as to the sureties. North v. Johnson, 58 Minn. 242 (59 N. W. 1012); McClendon v. Wells, 20 S. C. 514; Spaids v. Barrett, 57 Ill. 289 (11 Am. Rep. 10); Dalby v. Campbell, 26 Ill. App. 502. The construction which we think should be given the statute under consideration is strengthened by the provisions of sections 3885 and 3887 of the Code, which provide for a bond in attachment cases and designate the elements of damage that may be recovered thereon; the latter section expressly providing that exemplary damages are recoverable when malice in suing out the writ is shown. Applying the test of exclusion, it would seem to leave little doubt as to the limitation imposed by section 3992. Eur*149thermore, there is no evidence in the record which would justify a finding that the officer acted maliciously, or that he in any way exceeded the duty imposed upon him by the law. We hold, therefore, that' the court was in error in permitting the recovery of exemplary damages.
7' of rattorney fees. The plaintiff intervened in the attachment suit, and secured a release of the property. In this action on the indemnifying bond he claimed and was allowed the attorney’s fees charged him in the intervention proceedings. He was not entitled there- . to. In actions on the attachment bond attorney’s fees may be recovered under certain conditions, because the statute (Code, section 3887) expressly so provides. Except for the authority given by such statute, no recovery of attorney’s fees could.be had. Vorse v. Phillips, 37 Iowa, 428. The present action is on an indemnifying bond which bears no relation to an attachment bond. In actions of this kind no attorney’s fee is directly authorized by the statute to either the officer making the levy under the direction of the attaching creditor, or to the claimant of the property. In Cousins v. Paxton & G. Co., 122 Iowa, 465, we held that the officer might recover such fees in a suit on his indemnifying bond, because he was compelled to make the levy if directed so to do by the plaintiff, and the bond was furnished to him for the purpose of affording him full indemnity; that he had no personal interest in litigating the ownership of the property levied upon, and no interest in such litigation, except to protect himself and his bondsmen where he had performed the duty required of him by the statute. The officer being compelled to make a levy, and thereafter to hold the property when an indemnifying bond is furnished, he can not be fully indemnified unless he be permitted to .recover the money paid out by him in defending such levy. Code, section 3992, says, in effect, that the bond shall be given to indemnify the officer. But the provision in the *150same section relating to the claimant of the property is not in the same language. It provides only that the bond shall be conditioned to pay the claimant of the property the damages which he may sustain. This language is substantially the same as that used in section 3885 of the Code, which provides for a bond in attachment suits, and it has been the holding that no attorney’s fees could be allowed on such bonds in the absence of a statute expressly authorizing it. We think it was the intention of section 3992 to give the claimant of the property no greater rights thereunder than are given by section 3885. All of the claimant’s acts are voluntary. He may or may not attack the levy and contest the ownership -of the property. If he does attack it, it is for his private interest, and there is no more reason why he should be paid attorney’s fees in the absence of a statute so directing than that any other litigant should be permitted to recover his expense of that kind. We hold, therefore, that the claimant of property is not entitled to recover attorney’s fees on an indemnifying bond given under section 3992.
Some other matters are discussed by appellants, but in our judgment they are not of sufficient importance to demand farther notice. For the errors indicated the judgment must be reversed.