(a) Sheriffs, coroners, and constables are liable to judgment by motion before a judge of the court of general sessions, in favor of the party interested, for any money collected or received by them upon any debt or demand cognizable before a judge of the court of general sessions, and put into their hands for collection, whether such money was received before or after the issuance of a warrant for such debt or demand, and with or without judgment or execution.
(b) The judgment shall be for the amount so received, with interest and damages.