-
Notifications
You must be signed in to change notification settings - Fork 2
/
Exception.h
63 lines (48 loc) · 1.36 KB
/
Exception.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
#ifndef EXCEPTION_H
#define EXCEPTION_H
#include <string>
#include "fwk/Ptr.h"
#include "fwk/PtrInterface.h"
#include <iostream>
using namespace std;
//Base exception type.
class Exception {
public:
string what() const {return what_;}
virtual ~Exception(){};
Exception( char const * str ) : what_(str) {}
Exception( string str ) : what_(str) {}
private:
string what_;
};
class RangeException : public Exception {
public:
RangeException(string info) : Exception(info){};
~RangeException(){};
};
class NameInUseException : public Exception {
public:
NameInUseException(string info) : Exception(info){};
~NameInUseException(){};
};
class PermissionException : public Exception{
public:
PermissionException(string info) : Exception(info){};
~PermissionException(){};
};
class NoImplementationException : public Exception {
public:
NoImplementationException(string info) : Exception(info){};
~NoImplementationException(){};
};
class AttributeNotSupportedException : public NoImplementationException {
public:
AttributeNotSupportedException(string info) : NoImplementationException(info){};
~AttributeNotSupportedException(){};
};
class EntityNotFoundException : public Exception {
public:
EntityNotFoundException(string info) : Exception(info) {};
~EntityNotFoundException(){};
};
#endif