From e3a942c7388d5861ed4fba3884910bd0efac17b1 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Fri, 29 Jul 2016 14:02:43 -0400 Subject: Throw if send() fails in example code --- docs/types.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/types.rst b/docs/types.rst index 50e86ed0..98927607 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -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; } -- cgit v1.2.3