-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathError.h
83 lines (47 loc) · 2.31 KB
/
Error.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#pragma once
#include <string>
using std::string;
/*----------------------------------------------------------------------------------------------*/
class Error {
protected:
string msg;
public:
Error(const string& s) : msg(s) {}
string getMsg() { return msg; }
};
/*----------------------------------------------------------------------------------------------*/
class Pacman0Error : public Error {
public:
Pacman0Error() : Error("Error! \n\nThe Screen didn't have a Pacman, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/
class PacmanError : public Error {
public:
PacmanError() : Error("Error! \n\nThe Screen had more then 1 Pacman, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/
class Legend0Error : public Error {
public:
Legend0Error() : Error("Error! \n\nThe Screen didn't have a Legend, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/
class LegendError : public Error {
public:
LegendError() : Error("Error! \n\nThe Screen had more then 1 Legend, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/
class GhostError : public Error {
public:
GhostError() : Error("Error! \n\nThe Screen had more then 4 Ghosts, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/
class TunnelError : public Error {
public:
TunnelError() : Error("Error! \n\nThe Screen had an ilegal Tunnel, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/
class GeneralBoardError : public Error {
public:
GeneralBoardError() : Error("Error! \n\nThis Screen was not legal, cannot play current Screen \ncontinuing to next Screen... \n") {}
};
/*----------------------------------------------------------------------------------------------*/