bool brief;
public:
- UsageError(const std::string &r, bool b=true): Exception(r), brief(b) { }
+ UsageError(const std::string &r, bool b = true): Exception(r), brief(b) { }
bool get_brief() const { return brief; }
};
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; }