aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/Compiler.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-10-17 20:16:41 +0800
committerGitHub <noreply@github.com>2016-10-17 20:16:41 +0800
commit07d32937fd1aa0860611ce1307f08439317de449 (patch)
treef2a23ddceb8298eaed8e213c92f3bae91f6322c1 /liblll/Compiler.cpp
parentcc2a6867a7986b04c3f8013f508df77eab738d19 (diff)
parent8aa50a004fb320b927b96576f085cfbe5f845da6 (diff)
downloaddexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.tar
dexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.tar.gz
dexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.tar.bz2
dexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.tar.lz
dexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.tar.xz
dexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.tar.zst
dexon-solidity-07d32937fd1aa0860611ce1307f08439317de449.zip
Merge pull request #1229 from ethereum/lll-error-reporting
LLL: better error reporting
Diffstat (limited to 'liblll/Compiler.cpp')
-rw-r--r--liblll/Compiler.cpp30
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();
}