| author | Tero Marttila <terom@fixme.fi> |
| Thu, 22 Jan 2009 02:56:50 +0200 | |
| branch | new_graphics |
| changeset 420 | 278020dcd9b7 |
| parent 381 | 9b35bc329d23 |
| 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 |