aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-01-03 22:30:01 +0800
committerchriseth <chris@ethereum.org>2018-04-12 19:09:38 +0800
commit344a388d4461abd7369ea44b123f5afe549dc8f7 (patch)
tree46af2bf9ec5fa6aee5a0fafff3c01a50f79ffd51 /docs/contracts.rst
parentaa715f8759934ac68b76a2bef84c460b68be636a (diff)
downloaddexon-solidity-344a388d4461abd7369ea44b123f5afe549dc8f7.tar.gz
dexon-solidity-344a388d4461abd7369ea44b123f5afe549dc8f7.tar.zst
dexon-solidity-344a388d4461abd7369ea44b123f5afe549dc8f7.zip
Update documentation.
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 0dd9845c..0c697dd6 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -315,7 +315,10 @@ inheritable properties of contracts and may be overridden by derived contracts.
// function is executed and otherwise, an exception is
// thrown.
modifier onlyOwner {
- require(msg.sender == owner);
+ require(
+ msg.sender == owner,
+ "Only owner can call this function."
+ );
_;
}
}
@@ -360,7 +363,10 @@ inheritable properties of contracts and may be overridden by derived contracts.
contract Mutex {
bool locked;
modifier noReentrancy() {
- require(!locked);
+ require(
+ !locked,
+ "Reentrant call."
+ );
locked = true;
_;
locked = false;