Watch / Catching exceptions in Solidity

Catching exceptions in Solidity

  • YouTube
  • IPFS
  • Details

Catching exceptions in Solidity

Duration: 00:03:28

Speaker: Mudit Gupta

Type: Talk

Expertise: Intermediate

Event: Devcon 5

Date: Oct 2019

When a revert happens in solidity, all the state changes done in that transaction are rolled back. All the changes done in sub calls are also rolled back. If a contract A tries to do a token transfer in contract B but contract B reverts, all the changes done by contract A will also be rolled back. This is fine for some cases but sometimes there might be a need to ignore or handle this revert in the smart contract itself. The talk will demonstrate how reverts and other exceptions can be caught in Solidity.
  • Related