diff options
Diffstat (limited to 'liblll')
-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; |