LLL: simplify error handling in parseLLL

This commit is contained in:
Alex Beregszaszi 2016-11-30 15:06:13 +00:00
parent d82eac3fed
commit 53d4433484

View File

@ -99,7 +99,6 @@ std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::v
string dev::eth::parseLLL(string const& _src) string dev::eth::parseLLL(string const& _src)
{ {
bool failed = false;
sp::utree o; sp::utree o;
try try
@ -108,19 +107,12 @@ string dev::eth::parseLLL(string const& _src)
} }
catch (...) catch (...)
{ {
failed = true; killBigints(o);
return string();
} }
ostringstream ret; ostringstream ret;
debugOutAST(ret, o); debugOutAST(ret, o);
killBigints(o); killBigints(o);
return ret.str();
if (failed)
{
return string();
}
else
{
return ret.str();
}
} }