libyul: Change assertThrow() to yulAssert()

This commit is contained in:
Mathias Baumann 2019-03-05 18:39:16 +01:00
parent 921d52bfcd
commit a52b50d770

View File

@ -32,10 +32,10 @@ using namespace yul;
u256 yul::valueOfNumberLiteral(Literal const& _literal) u256 yul::valueOfNumberLiteral(Literal const& _literal)
{ {
assertThrow(_literal.kind == LiteralKind::Number, OptimizerException, ""); yulAssert(_literal.kind == LiteralKind::Number, "Expected number literal!");
std::string const& literalString = _literal.value.str(); std::string const& literalString = _literal.value.str();
assertThrow(isValidDecimal(literalString) || isValidHex(literalString), OptimizerException, ""); yulAssert(isValidDecimal(literalString) || isValidHex(literalString), "Invalid number literal!");
return u256(literalString); return u256(literalString);
} }