1
2
3
4
5
6 #ifndef SOULNG_LEXER_PARSING_EXCEPTION_INCLUDED
7 #define SOULNG_LEXER_PARSING_EXCEPTION_INCLUDED
8 #include <soulng/lexer/Span.hpp>
9 #include <stdexcept>
10 #include <string>
11
12 namespace soulng { namespace lexer {
13
14 class ParsingException : public std::runtime_error
15 {
16 public:
17 ParsingException(const std::string& message_, const std::string& fileName_, const Span& span_);
18 const std::string& Project() const { return project; }
19 const std::string& Message() const { return message; }
20 const std::string& FileName() const { return fileName; }
21 const Span& GetSpan() const { return span; }
22 void SetProject(const std::string& project_);
23 void* Module() const { return mod; }
24 void SetModule(void* mod_) { mod = mod_; }
25 private:
26 std::string project;
27 std::string message;
28 std::string fileName;
29 Span span;
30 void* mod;
31 };
32
33 } }
34
35 #endif // SOULNG_LEXER_PARSING_EXCEPTION_INCLUDED