author | terom |
Wed, 17 Dec 2008 00:40:22 +0000 | |
changeset 381 | 9b35bc329d23 |
parent 380 | d193dd1d8a7e |
child 423 | 947ab54de4b7 |
permissions | -rw-r--r-- |
380 | 1 |
|
2 |
#include "Error.hh" |
|
3 |
||
4 |
#include <cerrno> |
|
5 |
#include <sstream> |
|
6 |
||
7 |
std::string NetworkErrno::build_str (std::string op, int err) { |
|
8 |
std::stringstream ss; |
|
9 |
||
381
9b35bc329d23
separate sockaddr stuff out of NetworkAddress... now called NetworkEndpoint
terom
parents:
380
diff
changeset
|
10 |
ss << op << ": " << strerror(err); |
380 | 11 |
|
12 |
return ss.str(); |
|
13 |
} |
|
14 |
||
15 |
NetworkErrno::NetworkErrno (std::string op) : |
|
16 |
Error(build_str(op, errno)), err(errno) |
|
17 |
{ |
|
18 |
||
19 |
} |
|
20 |