From: mtk Date: Tue, 2 Aug 2011 09:29:01 +0000 (+0000) Subject: more verbose output for sendto() system exceptions X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=609676df269b2d400b11316800fbdcb733309c8f;p=senf.git more verbose output for sendto() system exceptions --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 --- diff --git a/senf/Socket/ReadWritePolicy.cc b/senf/Socket/ReadWritePolicy.cc index 7d177ab..97a96eb 100644 --- a/senf/Socket/ReadWritePolicy.cc +++ b/senf/Socket/ReadWritePolicy.cc @@ -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;