(1) An election is not to be voided on account of any delay in the declaration of nominations, voting or the return of the writ or on account of the absence or error of, or omission by, any officer which did not affect the result of the election.
(2) However, if any elector was, on account of the absence or error of, or omission by, any officer, prevented from voting in any election, the Court of Disputed Returns is not, for the purpose of determining whether the absence or error of, or omission by, the officer did or did not affect the result of the election, to admit any evidence of the way in which the elector intended to vote at the election.