author | terom |
Tue, 16 Dec 2008 23:21:26 +0000 | |
changeset 380 | d193dd1d8a7e |
child 381 | 9b35bc329d23 |
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 |
||
10 |
ss << op << ": " << strerror(errno); |
|
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 |