diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-15 09:27:54 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-15 09:27:54 +0800 |
commit | e5efc86f2d2d71c948340dbe31094056deb6d002 (patch) | |
tree | b07721a006053a4e23d803a854ac8b77d8d5dfce /liblll | |
parent | 2d9109ba453d49547778c39a506b0ed492305c16 (diff) | |
download | dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.tar dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.tar.gz dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.tar.bz2 dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.tar.lz dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.tar.xz dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.tar.zst dexon-solidity-e5efc86f2d2d71c948340dbe31094056deb6d002.zip |
LLL: better error reporting
Diffstat (limited to 'liblll')
-rw-r--r-- | liblll/Compiler.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp index f1538789..68499106 100644 --- a/liblll/Compiler.cpp +++ b/liblll/Compiler.cpp @@ -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 const& _e) + { + if (_errors) { + _errors->push_back("Parse exception."); + _errors->push_back(boost::diagnostic_information(_e)); + } } - catch (std::exception) + catch (...) { if (_errors) - _errors->push_back("Parse error."); + _errors->push_back("Internal parse exception."); } return string(); } |