Qrypt Security
Loading...
Searching...
No Matches
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
7namespace QryptSecurity {
8
9class QryptSecurityException : public std::exception {
10 private:
11 std::string _ExceptionMsg;
12
13 public:
19 QryptSecurityException(std::string message) {
20 _ExceptionMsg = message;
21 }
22
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 DataCorrupted(std::string message) : QryptSecurityException(message) {}
58};
59
61 public:
62 IncompatibleVersion(std::string message) : QryptSecurityException(message) {}
63};
64
65} // namespace
66
67#endif
Definition: qryptsecurity_exceptions.h:50
CannotDownload(std::string message)
Definition: qryptsecurity_exceptions.h:52
Definition: qryptsecurity_exceptions.h:55
DataCorrupted(std::string message)
Definition: qryptsecurity_exceptions.h:57
Definition: qryptsecurity_exceptions.h:60
IncompatibleVersion(std::string message)
Definition: qryptsecurity_exceptions.h:62
Definition: qryptsecurity_exceptions.h:40
InvalidArgument(std::string message)
Definition: qryptsecurity_exceptions.h:42
Definition: qryptsecurity_exceptions.h:9
~QryptSecurityException()=default
Destroys QryptSecurityException.
const char * what() const noexcept override
Returns the error message.
Definition: qryptsecurity_exceptions.h:31
QryptSecurityException(std::string message)
Constructs QryptSecurityException.
Definition: qryptsecurity_exceptions.h:19
Definition: qryptsecurity_exceptions.h:45
SystemError(std::string message)
Definition: qryptsecurity_exceptions.h:47
Definition: qryptsecurity_exceptions.h:35
UnknownError(std::string message)
Definition: qryptsecurity_exceptions.h:37
Definition: qryptsecurity.h:8