The opinion of the Court was drawn up by
Whitman C. J.This is an action of trespass, against the defendant as sheriff of this county, for the default of one of *352his deputies in not setting off an execution in favor of the plaintiff, against one Clark, in satisfaction of one, which Clark had obtained against him, then in the hands of the deputy. For this injury it is contended that trespass does not lie. The plaintiff, however, has set out the circumstances of his case specially ; and our statute has provided, that an action of trespass may be treated as an action of the case and vice versa. The special circumstances being set out, therefore, the action may be regarded as of the case, and it becomes unnecessary to determine whether trespass would lie or not.
It is objected, in behalf of the deputy, that the execution in favor of Clark had been assigned to a third person; but it appears that both of the demands had existed between the parties long anterior to the assignment. In such case one demand could not be so assigned as to affect the right of set-off on the part of the creditor in the other. This is an equitable right which the law protects, and will enforce.
It is next objected, that officers cannot be expected to know, when a demand appears to have been assigned, that it is not good against the claim of the debtor to have his cross demand set off against it. It may be that officers may find themselves in some degree of perplexity, occasionally, in reference to the rights of the parties in such cases ; but when they do, if their apprehensions of danger from proceeding, shall appear to be reasonable, security may be required to indemnify them from the consequences of their proceeding to act; and if they shall refuse to act upon being so indemnified they must do it at their peril; and so also if they refuse to act without giving notice of such reasonable apprehension of danger to the injury of the creditor. According to the agreement of the parties the defendant must be defaulted.