Any person voting or attempting to vote at the election who is not entitled to vote at it, as provided in this part, is subject to the same penalties and punishments as provided by the general election laws of this State, for voting or attempting to vote illegally.