Throw if send() fails in example code

This commit is contained in:
Denton Liu 2016-07-29 14:02:43 -04:00
parent 56727d61a6
commit e3a942c738

View File

@ -542,7 +542,8 @@ shown in the following example:
Campaign c = campaigns[campaignID];
if (c.amount < c.fundingGoal)
return false;
c.beneficiary.send(c.amount);
if (!c.beneficiary.send(c.amount))
throw;
c.amount = 0;
return true;
}