6 ms·
It would be a good idea for Solidity to properly support exceptions, this would probably simplify things a lot. Right now solidity has exceptions, but no way t
by socrates1024 10y ago
It would be a good idea for Solidity to properly support exceptions, this would probably simplify things a lot.
Right now solidity has exceptions, but no way to 'catch' them. Ordinary function calls automatically propagate exceptions when there's a problem. But, unintuitively, `send` behaves differently.
It would be trivial to modify `send` in Solidity so that it automatically throws an exception, like in Listing 3. But that's also often an anti-pattern, since it would allow the 'loser' to prevent the 'winner' from ever getting the money back. Sometimes it's important to keep on executing even if the `send` fails.
So once Solidity supports `catch`, that would help.