diff options
author | chriseth <chris@ethereum.org> | 2017-07-06 01:45:12 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-07-06 03:15:00 +0800 |
commit | 0400e61e284bd595384d859752d97993b1f5ca45 (patch) | |
tree | 81d1fbebb3b698fb49970e63a8c04029fc10d56a /libsolidity/analysis/SyntaxChecker.cpp | |
parent | 4bde6fa96122a308296e00dfb32da25905c5ef34 (diff) | |
download | dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.tar dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.tar.gz dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.tar.bz2 dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.tar.lz dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.tar.xz dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.tar.zst dexon-solidity-0400e61e284bd595384d859752d97993b1f5ca45.zip |
Deprecate throw.
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.cpp')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index 02e2fdcf..bde0e616 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -135,6 +135,16 @@ bool SyntaxChecker::visit(Break const& _breakStatement) return true; } +bool SyntaxChecker::visit(Throw const& _throwStatement) +{ + m_errorReporter.warning( + _throwStatement.location(), + "\"throw\" is deprecated in favour of \"revert()\", \"require()\" and \"assert()\"." + ); + + return true; +} + bool SyntaxChecker::visit(UnaryOperation const& _operation) { if (_operation.getOperator() == Token::Add) |