X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fexcept.h;h=6d34d4bd48d9309042c8f7fe6e6d9eb401053e2c;hp=bf7c526c378695d353098ef694311ff8231226cc;hb=5b0c36c9c6c9c30f1eb42186fed7acc7e99faf3e;hpb=b38f3713d39bca1adc476c594b037c98e7538e78 diff --git a/source/core/except.h b/source/core/except.h index bf7c526..6d34d4b 100644 --- a/source/core/except.h +++ b/source/core/except.h @@ -97,6 +97,15 @@ private: static std::string build_what(const std::string &, int); }; +/** +Thrown when "impossible" things happen. +*/ +class LogicError: public Exception +{ +public: + LogicError(const std::string &w_): Exception(w_) { } +}; + template void throw_at(E e, const std::string &a) { e.at(a); throw e; }