Dangerous SNMP
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
exception.hpp
1 #pragma once
2 
3 #include <stdexcept>
4 
5 namespace dangerous { namespace snmp {
6 
10 class Exception : public std::exception {
11 public:
17  explicit Exception( const char* text ) noexcept;
23  explicit Exception( const std::string& text ) noexcept;
24 
30  virtual const char* what() const noexcept;
31 
32 protected:
34  std::string _text;
35 };
36 
41 public:
47  explicit AuthenticationFailureException( const char* text ) noexcept;
53  explicit AuthenticationFailureException( const std::string& text ) noexcept;
54 };
55 
60 public:
66  explicit AuthenticationGenerationException( const char* text ) noexcept;
72  explicit AuthenticationGenerationException( const std::string& text ) noexcept;
73 };
74 
79 public:
85  explicit DecryptionException( const char* text ) noexcept;
91  explicit DecryptionException( const std::string& text ) noexcept;
92 };
93 
98 public:
104  explicit EncryptionException( const char* text ) noexcept;
110  explicit EncryptionException( const std::string& text ) noexcept;
111 };
112 
117 public:
123  explicit InvalidTypeException( const char* text ) noexcept;
129  explicit InvalidTypeException( const std::string& text ) noexcept;
130 };
131 
136 public:
142  explicit ParseErrorException( const char* text ) noexcept;
148  explicit ParseErrorException( const std::string& text ) noexcept;
149 };
150 
154 class TimeoutException : public Exception {
155 public:
161  explicit TimeoutException( const char* text ) noexcept;
167  explicit TimeoutException( const std::string& text ) noexcept;
168 };
169 
174 public:
180  explicit UnknownTransportException( const char* text ) noexcept;
186  explicit UnknownTransportException( const std::string& text ) noexcept;
187 };
188 
189 } }
190 
AuthenticationFailureException(const char *text) noexcept
Constructor.
This represents a failed attempt to generate authentication information.
Definition: exception.hpp:59
This represents a failed attempt to decrypt information.
Definition: exception.hpp:78
This represents a timeout event.
Definition: exception.hpp:154
virtual const char * what() const noexcept
This returns the text for the exception.
DecryptionException(const char *text) noexcept
Constructor.
EncryptionException(const char *text) noexcept
Constructor.
This represents a failed attempt to encrypt information.
Definition: exception.hpp:97
std::string _text
This is the exception text.
Definition: exception.hpp:34
This defines the base exception class for Dangerous SNMP.
Definition: exception.hpp:10
ParseErrorException(const char *text) noexcept
Constructor.
AuthenticationGenerationException(const char *text) noexcept
Constructor.
UnknownTransportException(const char *text) noexcept
Constructor.
This represents a parse-error event.
Definition: exception.hpp:135
This represents an authentication failure.
Definition: exception.hpp:40
This represents an unknown transport event.
Definition: exception.hpp:173
TimeoutException(const char *text) noexcept
Constructor.
InvalidTypeException(const char *text) noexcept
Constructor.
This represents a failed type conversion or use.
Definition: exception.hpp:116
Exception(const char *text) noexcept
Constructor.