Debian Codegraph @

misc/parseerror.h

raw symbols SCIP
1 #ifndef APPLICATION_UTILITIES_PARSE_ERROR_H
2 #define APPLICATION_UTILITIES_PARSE_ERROR_H
3
4 #include "../global.h"
5
6 #include <iosfwd>
7 #include <stdexcept>
8
9 namespace CppUtilities {
10
11 class CPP_UTILITIES_EXPORT ParseError : public std::runtime_error {
12 public:
13 ParseError();
14 ParseError(const std::string &what);
15 ~ParseError() noexcept override;
16 };
17
18 /*!
19 * \brief Constructs a new ParseError.
20 */
21 inline ParseError::ParseError()
22 : std::runtime_error("undetermined parsing")
23 {
24 }
25
26 /*!
27 * \brief Constructs a new ParseError. \a what is a std::string describing the cause of the ParseError.
28 */
29 inline ParseError::ParseError(const std::string &what)
30 : std::runtime_error(what)
31 {
32 }
33
34 CPP_UTILITIES_EXPORT std::ostream &operator<<(std::ostream &o, const ParseError &failure);
35
36 } // namespace CppUtilities
37
38 #endif // APPLICATION_UTILITIES_PARSE_ERROR_H