We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent695e074 commit4373fc1Copy full SHA for 4373fc1
error/src/network/error.hpp
@@ -9,6 +9,9 @@
9
/**
10
* \defgroup error Generic Error Handling
11
*
12
+ * This module contains a simple function that is used in generic
13
+ * error handling inside cpp-netlib.
14
+ *
15
* \file
16
* \brief Contains a set of error classes and exceptions for
17
* network connections.
@@ -28,6 +31,31 @@ namespace network {
28
31
* \endcode
29
32
*/
30
33
const std::error_category &network_category();
34
+
35
+/**
36
+ * \ingroup error
37
+ * \class network_exception network/error.hpp
38
+ * \brief An exception thrown in the event of a network error.
39
+*/
40
+classnetwork_exception :publicstd::system_error {
41
42
+public:
43
44
45
+ * \brief Constructor.
46
+ * \param error_code The system error code.
47
48
+explicitnetwork_exception(int error_code)
49
+ : std::system_error(error_code, network_category()) {
50
51
+ }
52
53
54
+ * \brief Destructor.
55
56
+virtual~network_exception()noexcept;
57
58
+ };
59
}// namespace network
60
61
#endif// NETWORK_ERROR_INC