//--- // fxos.errors: Exception specification //--- #ifndef LIBFXOS_ERRORS_H #define LIBFXOS_ERRORS_H #include #include namespace FxOS { /* Syntax errors for fxos data files */ class SyntaxError: public std::exception { public: /* Specifies the file and line of the exception */ SyntaxError(char const *file, int line, char const *what): m_file(file), m_line(line), m_what(what) {} /* Provides access to these free objets */ char const *file() const noexcept { return m_file; } int line() const noexcept { return m_line; } char const *what() const noexcept override { return m_what; } private: char const *m_file; int m_line; char const *m_what; }; } /* namespace FxOS */ #endif /* LIBFXOS_ERRORS_H */