If, upon any trial had under the provisions of sections thirty-three or thirty-four of this article, it be found either by the court, or by the jury, if one be impaneled, that the defense is well founded, judgment may be entered for the defendant against the plaintiff for the damages sustained by the defendant by reason of the attachment.