1 #ifndef MSP_DATAFILE_EXCEPT_H_
2 #define MSP_DATAFILE_EXCEPT_H_
11 class data_error: public std::runtime_error
18 data_error(const std::string &, unsigned, const std::string &);
19 data_error(const std::string &, unsigned, const std::exception &);
20 data_error(const std::string &, unsigned, const data_error &);
21 ~data_error() throw() override = default;
23 const std::string &get_source() const { return source; }
24 unsigned get_line() const { return line; }
27 std::string make_what(const std::string &, unsigned, const std::string &);
31 class parse_error: public std::runtime_error
34 parse_error(const std::string &);
35 ~parse_error() throw() override = default;
39 class syntax_error: public std::runtime_error
42 syntax_error(const std::string &t);
43 ~syntax_error() throw() override = default;
47 class bad_definition: public std::runtime_error
50 bad_definition(const std::string &w);
51 ~bad_definition() throw() override = default;
55 class nesting_error: public std::logic_error
58 nesting_error(const std::string &);
59 ~nesting_error() throw() override = default;
63 class unknown_keyword: public std::runtime_error
66 unknown_keyword(const std::string &);
67 ~unknown_keyword() throw() override = default;
71 class invalid_signature: public std::runtime_error
74 invalid_signature(const std::string &, const std::string &);
75 ~invalid_signature() throw() override = default;
79 class no_collection: public std::runtime_error
82 no_collection(const std::type_info &);
85 } // namespace DataFile