File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 9
9
/* *
10
10
* \defgroup error Generic Error Handling
11
11
*
12
+ * This module contains a simple function that is used in generic
13
+ * error handling inside cpp-netlib.
14
+ *
12
15
* \file
13
16
* \brief Contains a set of error classes and exceptions for
14
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
+ class network_exception : public std ::system_error {
41
+
42
+ public:
43
+
44
+ /* *
45
+ * \brief Constructor.
46
+ * \param error_code The system error code.
47
+ */
48
+ explicit network_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
+ };
31
59
} // namespace network
32
60
33
61
#endif // NETWORK_ERROR_INC
You can’t perform that action at this time.
0 commit comments