src/Network/Error.cc
author Tero Marttila <terom@fixme.fi>
Thu, 22 Jan 2009 02:56:50 +0200
branchnew_graphics
changeset 420 278020dcd9b7
parent 381 9b35bc329d23
child 423 947ab54de4b7
permissions -rw-r--r--
clean up Server/Client log output a bit

#include "Error.hh"

#include <cerrno>
#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)
{ 

}