-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherror.h
More file actions
37 lines (30 loc) · 1.16 KB
/
error.h
File metadata and controls
37 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include <stdexcept>
#include <string>
class ParserError : public std::runtime_error {
public:
size_t start;
size_t end;
explicit ParserError(const std::string& message, size_t start, size_t end);
explicit ParserError(const char* message, size_t start, size_t end);
};
class SyntaxError : public ParserError {
public:
explicit SyntaxError(const std::string& message, size_t start, size_t end);
explicit SyntaxError(const char* message, size_t start, size_t end);
};
class UnsupportedConstructError : public ParserError {
public:
explicit UnsupportedConstructError(const std::string& message, size_t start, size_t end);
explicit UnsupportedConstructError(const char* message, size_t start, size_t end);
};
class InvalidIdentifierError : public ParserError {
public:
explicit InvalidIdentifierError(const std::string& message, size_t start, size_t end);
explicit InvalidIdentifierError(const char* message, size_t start, size_t end);
};
class ParsingError : public ParserError {
public:
explicit ParsingError(const std::string& message, size_t start, size_t end);
explicit ParsingError(const char* message, size_t start, size_t end);
};