diff options
author | chriseth <c@ethdev.com> | 2016-08-01 18:43:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-01 18:43:21 +0800 |
commit | 267b32df83dba00c36d106cc3abf11f731a1b66f (patch) | |
tree | 9ae99ae8563587391cf9b2dcee37a38b4d38d83b /docs | |
parent | 66133469e9422377747ff16f23b849e37f673ef1 (diff) | |
parent | e3a942c7388d5861ed4fba3884910bd0efac17b1 (diff) | |
download | dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.tar dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.tar.gz dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.tar.bz2 dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.tar.lz dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.tar.xz dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.tar.zst dexon-solidity-267b32df83dba00c36d106cc3abf11f731a1b66f.zip |
Merge pull request #764 from Denton-L/make-safe
Throw if send() fails in example code
Diffstat (limited to 'docs')
-rw-r--r-- | docs/types.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/types.rst b/docs/types.rst index d7681ee5..35f0e247 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -545,7 +545,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; } |