1 mike 1.1 #ifndef _ParserExceptions_h
2 #define _ParserExceptions_h
3
4 #include <cstring>
5 #include <cstdlib>
6
7 namespace ParserExceptions
8 {
9
10 class ParserLexException
11 {
12 public:
13
14 ParserLexException(const char* message)
15 {
16 _message = strcpy(new char[strlen(message) + 1], message);
17 }
18
19 ~ParserLexException()
20 {
21 delete [] _message;
22 mike 1.1 }
23
24 const char* getMessage() const { return _message; }
25
26 private:
27 char* _message;
28 };
29
30 }
31
32 #endif /* _ParserExceptions_h */
|