I'm experimenting with contract CrowdFunder which I found on the net
https://github.com/nemild/learnxinyminutes-docs/blob/solidity/solidity.html.markdown
and I'm getting an error Solidity exception (bad jump) when function payOut() is executed and state enum variable is different than the one which is passed to inState(State.Successful)
enum State {
Fundraising,
ExpiredRefundPending,
Successful,
ExpiredRefundComplete
}
modifier inState(State _state) {
if (state != _state) throw;
_
}
If state == _state then there is no error. Function executes as expected.
function payOut()
public
inState(State.Successful)
{
if(!fundRecipient.send(this.balance)) {
throw;
}
winnerPaid(fundRecipient);
}
Is this because inState function is defined to execute throw when the _state !=state. Is this the cause of Solidity exception (bad jump)?