From 344a388d4461abd7369ea44b123f5afe549dc8f7 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 3 Jan 2018 15:30:01 +0100 Subject: Update documentation. --- docs/contracts.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docs/contracts.rst') 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; -- cgit