diff options
author | chriseth <chris@ethereum.org> | 2016-11-01 18:59:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-01 18:59:05 +0800 |
commit | 1a2c150e3b2f98ef44834aca281692734b74c0db (patch) | |
tree | 4cfc7d03d285133fe373b6f9df0b68a7412a9260 /liblll/CodeFragment.h | |
parent | 9cb1d30eab34e530f3c8bf67367c04787048bace (diff) | |
parent | ac3c8a553a0b943984742f6b12d9d0a3cabcb877 (diff) | |
download | dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.gz dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.bz2 dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.lz dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.xz dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.zst dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.zip |
Merge pull request #1298 from ethereum/lll-error-reporting
LLL: further improve error reporting
Diffstat (limited to 'liblll/CodeFragment.h')
-rw-r--r-- | liblll/CodeFragment.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/liblll/CodeFragment.h b/liblll/CodeFragment.h index e0d48ab7..637d169f 100644 --- a/liblll/CodeFragment.h +++ b/liblll/CodeFragment.h @@ -51,6 +51,11 @@ private: void finalise(CompilerState const& _cs); template <class T> void error() const { BOOST_THROW_EXCEPTION(T() ); } + template <class T> void error(std::string const& reason) const { + auto err = T(); + err << errinfo_comment(reason); + BOOST_THROW_EXCEPTION(err); + } void constructOperation(sp::utree const& _t, CompilerState& _s); bool m_finalised = false; |