Qrypt Security
All Classes Namespaces Files Functions Variables Enumerations Enumerator
qryptsecurity_exceptions.h
Go to the documentation of this file.
1 #ifndef QRYPTSECURITY_EXCEPTIONS_H
2 #define QRYPTSECURITY_EXCEPTIONS_H
3 
4 #include <exception>
5 #include <string>
6 
7 namespace QryptSecurity {
8 
9 class QryptSecurityException : public std::exception {
10  private:
11  std::string _ExceptionMsg;
12 
13  public:
19  QryptSecurityException(std::string message) {
20  _ExceptionMsg = message;
21  }
22 
26  ~QryptSecurityException() = default;
27 
31  const char *what() const noexcept override { return _ExceptionMsg.c_str(); };
32 };
33 
34 
36  public:
37  UnknownError(std::string message) : QryptSecurityException(message) {}
38 };
39 
41  public:
42  InvalidArgument(std::string message) : QryptSecurityException(message) {}
43 };
44 
46  public:
47  SystemError(std::string message) : QryptSecurityException(message) {}
48 };
49 
51  public:
52  CannotDownload(std::string message) : QryptSecurityException(message) {}
53 };
54 
56  public:
57  HttpClientError(std::string message) : CannotDownload(message) {}
58 };
59 
61  public:
62  DataCorrupted(std::string message) : QryptSecurityException(message) {}
63 };
64 
66  public:
67  IncompatibleVersion(std::string message) : QryptSecurityException(message) {}
68 };
69 
70 } // namespace
71 
72 #endif
QryptSecurity::SystemError
Definition: qryptsecurity_exceptions.h:45
QryptSecurity::HttpClientError
Definition: qryptsecurity_exceptions.h:55
QryptSecurity
Definition: qryptsecurity.h:9
QryptSecurity::QryptSecurityException::QryptSecurityException
QryptSecurityException(std::string message)
Constructs QryptSecurityException
Definition: qryptsecurity_exceptions.h:19
QryptSecurity::QryptSecurityException::what
const char * what() const noexcept override
Returns the error message
Definition: qryptsecurity_exceptions.h:31
QryptSecurity::IncompatibleVersion
Definition: qryptsecurity_exceptions.h:65
QryptSecurity::InvalidArgument::InvalidArgument
InvalidArgument(std::string message)
Definition: qryptsecurity_exceptions.h:42
QryptSecurity::IncompatibleVersion::IncompatibleVersion
IncompatibleVersion(std::string message)
Definition: qryptsecurity_exceptions.h:67
QryptSecurity::UnknownError::UnknownError
UnknownError(std::string message)
Definition: qryptsecurity_exceptions.h:37
QryptSecurity::CannotDownload
Definition: qryptsecurity_exceptions.h:50
QryptSecurity::InvalidArgument
Definition: qryptsecurity_exceptions.h:40
QryptSecurity::UnknownError
Definition: qryptsecurity_exceptions.h:35
QryptSecurity::DataCorrupted
Definition: qryptsecurity_exceptions.h:60
QryptSecurity::SystemError::SystemError
SystemError(std::string message)
Definition: qryptsecurity_exceptions.h:47
QryptSecurity::HttpClientError::HttpClientError
HttpClientError(std::string message)
Definition: qryptsecurity_exceptions.h:57
QryptSecurity::QryptSecurityException
Definition: qryptsecurity_exceptions.h:9
QryptSecurity::CannotDownload::CannotDownload
CannotDownload(std::string message)
Definition: qryptsecurity_exceptions.h:52
QryptSecurity::QryptSecurityException::~QryptSecurityException
~QryptSecurityException()=default
Destroys QryptSecurityException
QryptSecurity::DataCorrupted::DataCorrupted
DataCorrupted(std::string message)
Definition: qryptsecurity_exceptions.h:62