-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathException.hpp
More file actions
39 lines (32 loc) · 824 Bytes
/
Exception.hpp
File metadata and controls
39 lines (32 loc) · 824 Bytes
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
#ifndef _EXCEPTION_H
#define _EXCEPTION_H
#include <exception>
class Exception: public std::exception{
public:
Exception() throw(){}
virtual ~Exception() throw(){}
/** Returns a C-style character string describing the general cause
* of the current error. */
virtual const char* what() const throw(){
return "Undefined Exception";
}
};
class IncorrectDataException:public Exception{
public:
const char* what() const throw(){
return "Incorrect Data Format";
}
};
class IncorrectSessionException:public Exception{
public:
const char* what() const throw(){
return "Incorrect Session";
}
};
class HandlingFailureException: public Exception{
public:
const char* what() const throw(){
return "Handling Failure";
}
};
#endif // !_EXCEPTION_h