-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathIIIErrorHandling.h
41 lines (38 loc) · 1.04 KB
/
IIIErrorHandling.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
#ifndef GUARD_IIIErrorHandling_h
#define GUARD_IIIErrorHandling_h
#include<string>
#include"IIIErrorHandling.h"
class NotATriangleException {
public:
const std::string what()const throw() {
return "Error: not a Triangle, double check\n"
"leftCornerX<rightCornerX &&\n"
"leftCornerY<upsideY &&\n"
"rightCornerY<upsideY\n";
}
};
class NotARectangleException {
public:
const std::string what()const throw() {
return "Error: not a Rectangle, double check\n"
"downsideLeftCornerX<upsideRightCornerX &&\n"
"downsideLeftCornerY<upsideRighCornerY\n";
}
};
class NotASquareException {
public:
const std::string what()const throw() {
return "Error: not a Square, double check\n"
"downsideLeftCornerX<upsideRightCornerX &&\n"
"downsideLeftCornerY<upsideRighCornerY &&\n"
"upsideRightCornerX-downsideLeftCornerX=upsideLeftCornerY-downsideLeftCornery\n";
}
};
class NotACircleException {
public:
const std::string what()const throw() {
return "Error: not a Circle, double check "
"whole three points are not in a line\n";
}
};
#endif