mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: better error reporting
This commit is contained in:
parent
2d9109ba45
commit
e5efc86f2d
@ -45,13 +45,21 @@ bytes dev::eth::compileLLL(string const& _src, bool _opt, vector<string>* _error
|
||||
if (_errors)
|
||||
{
|
||||
_errors->push_back("Parse error.");
|
||||
_errors->push_back(diagnostic_information(_e));
|
||||
_errors->push_back(boost::diagnostic_information(_e));
|
||||
}
|
||||
}
|
||||
catch (std::exception)
|
||||
catch (std::exception const& _e)
|
||||
{
|
||||
if (_errors)
|
||||
_errors->push_back("Parse error.");
|
||||
{
|
||||
_errors->push_back("Parse exception.");
|
||||
_errors->push_back(boost::diagnostic_information(_e));
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
if (_errors)
|
||||
_errors->push_back("Internal parse exception.");
|
||||
}
|
||||
return bytes();
|
||||
}
|
||||
@ -70,12 +78,22 @@ std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::v
|
||||
catch (Exception const& _e)
|
||||
{
|
||||
if (_errors)
|
||||
_errors->push_back(diagnostic_information(_e));
|
||||
{
|
||||
_errors->push_back("Parse error.");
|
||||
_errors->push_back(boost::diagnostic_information(_e));
|
||||
}
|
||||
catch (std::exception)
|
||||
}
|
||||
catch (std::exception const& _e)
|
||||
{
|
||||
if (_errors) {
|
||||
_errors->push_back("Parse exception.");
|
||||
_errors->push_back(boost::diagnostic_information(_e));
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
if (_errors)
|
||||
_errors->push_back("Parse error.");
|
||||
_errors->push_back("Internal parse exception.");
|
||||
}
|
||||
return string();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user