Author: Thomas Wiesner
2017-07-16
Exception Handling in Solidity
Since version 0.4.13 we have a new Exception handling in Solidity. Instead of a simple throw
we have now revert()
, require()
and assert()
.
In this short video I'll walk you through the exact difference between the old and the new exception handling.
We have a look how it delegates exceptions between accounts<->contracts and accounts<->contracts<->contracts. I also show you why the low level functions .call()()
and .send()
are so dangerous and why it's better to use .transfer()
.
I'm happy to answer any questions in the comments!
And here is the code: