diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-10-26 20:47:32 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-01 07:19:32 +0800 |
commit | b269202b73dc6a22c0f6adc849d8fc063119e346 (patch) | |
tree | 7be943ba0addc259063d5619fdb6add25f42b9ef /liblll/CodeFragment.h | |
parent | 979d18f19c711093cdc7f4112a76bf2135c97119 (diff) | |
download | dexon-solidity-b269202b73dc6a22c0f6adc849d8fc063119e346.tar.gz dexon-solidity-b269202b73dc6a22c0f6adc849d8fc063119e346.tar.zst dexon-solidity-b269202b73dc6a22c0f6adc849d8fc063119e346.zip |
LLL: support passing error reasons
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; |