aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-10-05 21:49:59 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-10-12 15:35:05 +0800
commit618410de1113c17499cc3d8dad880c66a5a2d7bf (patch)
treeab3d9c526d4df80e190df061709961299f72773e
parent48ac9706770f72fe95848656147131c4ea644a77 (diff)
downloaddexon-solidity-618410de1113c17499cc3d8dad880c66a5a2d7bf.tar.gz
dexon-solidity-618410de1113c17499cc3d8dad880c66a5a2d7bf.tar.zst
dexon-solidity-618410de1113c17499cc3d8dad880c66a5a2d7bf.zip
Adding "When Solidity Throws" section in the documentation
-rw-r--r--docs/miscellaneous.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst
index c4a954ad..16033837 100644
--- a/docs/miscellaneous.rst
+++ b/docs/miscellaneous.rst
@@ -56,6 +56,22 @@ So for the following contract snippet::
The position of ``data[4][9].b`` is at ``keccak256(uint256(9) . keccak256(uint256(4) . uint256(1))) + 1``.
+********************
+When Solidity Throws
+********************
+
+Solidity contract throws an exception for unhealthy operations such as
+
+- division by zero
+- modulo by zero
+- out-of-bounds access on a fixed bytes value
+- out-of-bounds access on an array
+- a positive value seen by a function without ``payable`` mofifier except when the function is a library function
+- execution of ``throw;``
+- a contract invocation with no matching interface function or a fallback function
+- an external call in an exceptional state, for instance, out of gas, invalid jump destination, and so on (however, low level ``call``, ``send``, ``delegatecall`` and ``callcode`` just return zero for such cases).
+
+
*****************
Esoteric Features
*****************