On the trial of prosecutions for any crime or misdemeanor, it shall be the duty of the judge to sign any bill of exceptions tendered by the defendant during the progress thereof, if the truth of the case be fairly stated therein, and the said exceptions shall be a part of the record of such prosecution.