aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/CodeFragment.h
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-26 20:47:32 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-01 07:19:32 +0800
commitb269202b73dc6a22c0f6adc849d8fc063119e346 (patch)
tree7be943ba0addc259063d5619fdb6add25f42b9ef /liblll/CodeFragment.h
parent979d18f19c711093cdc7f4112a76bf2135c97119 (diff)
downloaddexon-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.h5
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;