more verbose output for sendto() system exceptions
mtk [Tue, 2 Aug 2011 09:29:01 +0000 (09:29 +0000)]
--ehis line, and those below, will be ignored--

M    senf/Socket/ReadWritePolicy.cc

git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1804 270642c3-0616-0410-b53a-bc976706d245

senf/Socket/ReadWritePolicy.cc

index 7d177ab..97a96eb 100644 (file)
@@ -30,6 +30,8 @@
  */
 
 #include "ReadWritePolicy.hh"
+#include "senf/Utils/hexdump.hh"
+#include "senf/Utils/String.hh"
 //#include "ReadWritePolicy.ih"
 
 // Custom includes
@@ -131,7 +133,10 @@ prefix_ unsigned senf::WriteablePolicy::do_writeto(FileHandle & handle,
                 rv = 0;
                 break;
             default:
-                SENF_THROW_SYSTEM_EXCEPTION("::sendto");
+               std::stringstream a, b;
+                senf::hexdump( (char*) addr , ((char*) addr) + len , a);
+               senf::hexdump( (char*) buffer , ((char*) buffer) + size , b);
+                SENF_THROW_SYSTEM_EXCEPTION("::sendto(" + senf::str(b) + ") to " + senf::str(a));
             }
     } while (rv<0);
     return rv;