diff options
author | Christian <c@ethdev.com> | 2014-11-05 21:20:56 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-05 22:01:24 +0800 |
commit | c1f7a1665f17c5f9865534c7a26827cfbf6f3dd5 (patch) | |
tree | 758fd6ffa201c101c272e8d671697c65acf294b8 /Types.h | |
parent | 1de66d6e9ea5ad04f96247895a867be53e42da7c (diff) | |
download | dexon-solidity-c1f7a1665f17c5f9865534c7a26827cfbf6f3dd5.tar.gz dexon-solidity-c1f7a1665f17c5f9865534c7a26827cfbf6f3dd5.tar.zst dexon-solidity-c1f7a1665f17c5f9865534c7a26827cfbf6f3dd5.zip |
Converted all asserts to exceptions.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -26,6 +26,7 @@ #include <string> #include <boost/noncopyable.hpp> #include <libdevcore/Common.h> +#include <libsolidity/Exceptions.h> #include <libsolidity/ASTForward.h> #include <libsolidity/Token.h> @@ -75,7 +76,11 @@ public: virtual unsigned getCalldataEncodedSize() const { return 0; } virtual std::string toString() const = 0; - virtual u256 literalValue(Literal const&) const { assert(false); } + virtual u256 literalValue(Literal const&) const + { + BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Literal value requested " + "for type without literals.")); + } }; /** |