SEC. 23. And be it further enacted, That a writ of error as aforesaid shall be a supersedeas and stay execution in cases only where the writ of error is served, by a copy thereof being lodged for the adverse party in the clerks office where the record remains, within ten days, Sundays exclusive, after rendering the judgment or passing the decree complained of. Until the expiration of which term of ten days, executions shall not issue in any case where a writ of error may be a supersedeas; and whereupon such writ of error the Supreme or a circuit court shall affirm a judgment or decree, they shall adjudge or decree to the respondent in error just damages for his delay, and single or double costs at their discretion.