You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An assert-style exception is generated in the following situations:
If you access an array at a too large or negative index (i.e. x[i] where i >= x.length or i < 0).
If you access a fixed-length bytesN at a too large or negative index.
If you divide or modulo by zero (e.g. 5 / 0 or 23 % 0).
If you shift by a negative amount.
If you convert a value too big or negative into an enum type.
If you call a zero-initialized variable of internal function type.
If you call assert with an argument that evaluates to false.
A require-style exception is generated in the following situations:
Calling throw.
Calling require with an argument that evaluates to false.
If you call a function via a message call but it does not finish properly (i.e. it runs out of gas, has no matching function, or throws an exception itself), except when a low level operation call, send, delegatecall or callcode is used. The low level operations never throw exceptions but indicate failures by returning false.
If you create a contract using the new keyword but the contract creation does not finish properly (see above for the definition of "not finish properly").
If you perform an external function call targeting a contract that contains no code.
If your contract receives Ether via a public function without payable modifier (including the constructor and the fallback function).
If your contract receives Ether via a public getter function.
If a .transfer() fails.
Does it work for Array? Which parts do?
The text was updated successfully, but these errors were encountered:
Section:
https://github.com/arrayio/array-io-solidity/blob/master/control-structures.rst#error-handling-assert-require-revert-and-exceptions
The text was updated successfully, but these errors were encountered: