src/Network/Error.cc
author Tero Marttila <terom@fixme.fi>
Tue, 27 Jan 2009 03:02:02 +0200
changeset 441 f769fab21a6c
parent 423 947ab54de4b7
permissions -rw-r--r--
fix bug with NetworkBufferOutput where push_write doesn't update offset

#include "Error.hh"
#include "Platform.hh"

#include <sstream>

std::string NetworkErrno::build_str (std::string op, int err) {
    std::stringstream ss;

    ss << op << ": " << strerror(err);

    return ss.str();
}

NetworkErrno::NetworkErrno (std::string op) :
    Error(build_str(op, errno)), err(errno)
{ 

}