summaryrefslogtreecommitdiff
path: root/include/exceptions.hpp
blob: 0469784a1432ccc8cb65a0d7e5d0a1d4f2d4b3dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <string>
#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H

class Exception{
private:
  std::string error_msg;
public:
  Exception(const std::string &error_msg);
  std::string showMsg();
};

class LexerException: public Exception{
public:
  LexerException(const std::string &error_msg): Exception(error_msg){}
};

class ParserException: public Exception{
public:
  ParserException(const std::string &error_msg): Exception(error_msg){}
};

#endif /* EXCEPTIONS_H */