- ParseError(const std::string &w_, const std::string &s, unsigned l): Exception(w_), source(s), line(l) { }
- const std::string &get_source() const { return source; }
- unsigned get_line() const { return line; }
- ~ParseError() throw() { }
-private:
- std::string source;
- unsigned line;
+ parse_error(const std::string &);
+ ~parse_error() throw() override = default;
+};
+
+
+class syntax_error: public std::runtime_error
+{
+public:
+ syntax_error(const std::string &t);
+ ~syntax_error() throw() override = default;
+};
+
+
+class bad_definition: public std::runtime_error
+{
+public:
+ bad_definition(const std::string &w);
+ ~bad_definition() throw() override = default;
+};
+
+
+class nesting_error: public std::logic_error
+{
+public:
+ nesting_error(const std::string &);
+ ~nesting_error() throw() override = default;
+};
+
+
+class unknown_keyword: public std::runtime_error
+{
+public:
+ unknown_keyword(const std::string &);
+ ~unknown_keyword() throw() override = default;
+};
+
+
+class invalid_signature: public std::runtime_error
+{
+public:
+ invalid_signature(const std::string &, const std::string &);
+ ~invalid_signature() throw() override = default;
+};
+
+
+class no_collection: public std::runtime_error
+{
+public:
+ no_collection(const std::type_info &);