aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-05 21:20:56 +0800
committerChristian <c@ethdev.com>2014-11-05 22:01:24 +0800
commitc1f7a1665f17c5f9865534c7a26827cfbf6f3dd5 (patch)
tree758fd6ffa201c101c272e8d671697c65acf294b8 /Types.h
parent1de66d6e9ea5ad04f96247895a867be53e42da7c (diff)
downloaddexon-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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Types.h b/Types.h
index 190134d7..4493b803 100644
--- a/Types.h
+++ b/Types.h
@@ -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."));
+ }
};
/**