The court shall decide all questions of law which arise in the course of the trial.
N.D.C.C. § 29-21-03