]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/except.h
Add LogicError exception class
[libs/core.git] / source / core / except.h
index bf7c526c378695d353098ef694311ff8231226cc..6d34d4bd48d9309042c8f7fe6e6d9eb401053e2c 100644 (file)
@@ -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<typename E>
 void throw_at(E e, const std::string &a)
 { e.at(a); throw e; }