At any time before a failure to comply with the undertaking the bail may surrender the defendant in their exoneration or he may surrender himself to the sheriff of the county in which he was arrested in the following manner:
(1) A certified copy of the undertaking of the bail shall be delivered to the sheriff or constable who shall, by a certificate in writing, acknowledge the surrender; and(2) Upon the production of a copy of the undertaking and the sheriff's or constable's certificate a judge or clerk of the court may, upon notice to the plaintiff of eight days with a copy of the certificate, order that the bail be exonerated.And on filing the order and papers used on such application they shall be exonerated accordingly. But this section shall not apply to an arrest for the cause mentioned in item (2) of Section 15-17-20, so as to discharge the bail from an undertaking given to the effect provided by Section 15-69-140.
1870 (14) 468 Section 211; Civ. P. '02 Section 209; Civ. P. '12 Section 239; Civ. P. '22 Section 451; 1932 Code Section 509; 1942 Code Section 509; 1952 Code Section 10-873; 1962 Code Section 10-873.