librcsb-core-wrapper  1.005
Exceptions.h
Go to the documentation of this file.
1 //$$FILE$$
2 //$$VERSION$$
3 //$$DATE$$
4 //$$LICENSE$$
5 
6 
14 #ifndef EXCEPTIONS_H
15 #define EXCEPTIONS_H
16 
17 
18 #include <stdexcept>
19 #include <string>
20 
21 
23 class RcsbException : public std::exception
24 {
25  protected:
26  std::string _message;
27 
28  public:
29  RcsbException(const std::string& message = std::string(),
30  const std::string& location = std::string());
31  ~RcsbException() throw();
32 
33  void AppendMessage(const std::string& message = std::string(),
34  const std::string& location = std::string());
35 
36  const char* what() const throw();
37 };
38 
39 
42 {
43 
44  public:
45  EmptyValueException(const std::string& message = std::string(),
46  const std::string& location = std::string());
48 
49 };
50 
51 
54 {
55 
56  public:
57  NotFoundException(const std::string& message = std::string(),
58  const std::string& location = std::string());
59  ~NotFoundException() throw();
60 
61 };
62 
63 
66 {
67 
68  public:
69  AlreadyExistsException(const std::string& message = std::string(),
70  const std::string& location = std::string());
72 
73 };
74 
75 
78 {
79 
80  public:
81  EmptyContainerException(const std::string& message = std::string(),
82  const std::string& location = std::string());
84 
85 };
86 
87 
90 {
91 
92  public:
93  FileModeException(const std::string& message = std::string(),
94  const std::string& location = std::string());
95  ~FileModeException() throw();
96 
97 };
98 
99 
102 {
103 
104  public:
105  InvalidStateException(const std::string& message = std::string(),
106  const std::string& location = std::string());
108 
109 };
110 
111 
114 {
115 
116  public:
117  FileException(const std::string& message = std::string(),
118  const std::string& location = std::string());
119  ~FileException() throw();
120 
121 };
122 
125 {
126  public:
127  InvalidOptionsException(const std::string& message = std::string(),
128  const std::string& location = std::string());
130 };
131 
134 {
135 
136  public:
137  VersionMismatchException(const std::string& message = std::string(),
138  const std::string& location = std::string());
140 
141 };
142 
143 #endif
Object already exists.
Definition: Exceptions.h:66
AlreadyExistsException(const std::string &message=std::string(), const std::string &location=std::string())
Empty container.
Definition: Exceptions.h:78
EmptyContainerException(const std::string &message=std::string(), const std::string &location=std::string())
Empty value exception (e.g. NULL pointer, empty string)
Definition: Exceptions.h:42
EmptyValueException(const std::string &message=std::string(), const std::string &location=std::string())
Generic files related exception (e.g. read error, write errror, etc.)
Definition: Exceptions.h:114
FileException(const std::string &message=std::string(), const std::string &location=std::string())
File mode exception (e.g. attempt to write to read-only file, invalid mode.)
Definition: Exceptions.h:90
FileModeException(const std::string &message=std::string(), const std::string &location=std::string())
Invalid command line options.
Definition: Exceptions.h:125
InvalidOptionsException(const std::string &message=std::string(), const std::string &location=std::string())
Invalid state exception (e.g. getting a row reference in a column-wise table/// )
Definition: Exceptions.h:102
InvalidStateException(const std::string &message=std::string(), const std::string &location=std::string())
Object not found (thrown everywhere except from .find() methods)
Definition: Exceptions.h:54
NotFoundException(const std::string &message=std::string(), const std::string &location=std::string())
Base class for all RCSB exceptions.
Definition: Exceptions.h:24
std::string _message
Definition: Exceptions.h:26
RcsbException(const std::string &message=std::string(), const std::string &location=std::string())
const char * what() const
void AppendMessage(const std::string &message=std::string(), const std::string &location=std::string())
Versions do not match.
Definition: Exceptions.h:134
VersionMismatchException(const std::string &message=std::string(), const std::string &location=std::string())