FiberIO
Fiber-based C++ network library
exceptions.hpp
Go to the documentation of this file.
1 #ifndef _FIBERIO_EXCEPTIONS_H_
2 #define _FIBERIO_EXCEPTIONS_H_
3 
4 #include <stdexcept>
5 
6 namespace fiberio {
7 
9 class io_error : public std::runtime_error
10 {
11 public:
12  io_error(const char* msg) : runtime_error{msg} {}
13 };
14 
15 
18 {
19 public:
20  socket_closed_error() : io_error{"stream closed"} {}
21 };
22 
25 {
26 public:
28  : io_error{"address family not supported"} {}
29 };
30 
31 
32 }
33 
34 #endif
io_error(const char *msg)
Definition: exceptions.hpp:12
This is thrown when something fails because the connection was closed.
Definition: exceptions.hpp:17
Thrown when e.g. trying to use IPv6 and it&#39;s not supported on the system.
Definition: exceptions.hpp:24
This is thrown on I/O errors.
Definition: exceptions.hpp:9