Added Error Message

Added a descriptive error message to enhance clarity when errors are encountered.
pull/4883/head
wizard701 5 months ago committed by Aniket
parent eaea4113d4
commit 0405619293
  1. 4
      apps/remix-ide/contracts/ballot.sol

@ -60,7 +60,7 @@ contract Ballot {
!voters[voter].voted,
"The voter already voted."
);
require(voters[voter].weight == 0);
require(voters[voter].weight == 0, "Voter already has the right to vote.");
voters[voter].weight = 1;
}
@ -135,4 +135,4 @@ contract Ballot {
{
winnerName_ = proposals[winningProposal()].name;
}
}
}

Loading…
Cancel
Save