aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/common-patterns.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst
index 422e2758..322be3ef 100644
--- a/docs/common-patterns.rst
+++ b/docs/common-patterns.rst
@@ -82,13 +82,13 @@ restrictions highly readable.
// refunded, but only after the function body.
// This is dangerous, because if the function
// uses `return` explicitly, this will not be
- // done!
+ // done! This behavior will be fixed in Version 0.4.0.
modifier costs(uint _amount) {
if (msg.value < _amount)
throw;
_
if (msg.value > _amount)
- msg.sender.send(_amount - msg.value);
+ msg.sender.send(msg.value - _amount);
}
function forceOwnerChange(address _newOwner)
@@ -163,7 +163,9 @@ function finishes.
the code in the transitionNext modifier
can be skipped if the function itself uses
return. If you want to do that, make sure
- to call nextStage manually from those functions.
+ to call nextStage manually from those functions.
+ With version 0.4.0 (unreleased), modifier code
+ will run even if the function explicitly returns.
::