src/Network/Error.cc
changeset 380 d193dd1d8a7e
child 381 9b35bc329d23
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Network/Error.cc	Tue Dec 16 23:21:26 2008 +0000
@@ -0,0 +1,20 @@
+
+#include "Error.hh"
+
+#include <cerrno>
+#include <sstream>
+
+std::string NetworkErrno::build_str (std::string op, int err) {
+    std::stringstream ss;
+
+    ss << op << ": " << strerror(errno);
+
+    return ss.str();
+}
+
+NetworkErrno::NetworkErrno (std::string op) :
+    Error(build_str(op, errno)), err(errno)
+{ 
+
+}
+