If the defendant does not appear on the day ordered by the court, the court may order the undertaking to be prosecuted. If the undertaking is prosecuted, the measure of damages is the extent of the loss or injury sustained by the aggrieved party by reason of the misconduct for which the warrant was issued and the costs of the proceeding.