summaryrefslogtreecommitdiff
path: root/zen/socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/socket.h')
-rw-r--r--zen/socket.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/socket.h b/zen/socket.h
index df8b768b..4ccde190 100644
--- a/zen/socket.h
+++ b/zen/socket.h
@@ -143,7 +143,7 @@ namespace
size_t tryReadSocket(SocketType socket, void* buffer, size_t bytesToRead) //throw SysError; may return short, only 0 means EOF!
{
if (bytesToRead == 0) //"read() with a count of 0 returns zero" => indistinguishable from end of file! => check!
- throw std::logic_error("Contract violation! " + std::string(__FILE__) + ':' + numberTo<std::string>(__LINE__));
+ throw std::logic_error(std::string(__FILE__) + '[' + numberTo<std::string>(__LINE__) + "] Contract violation!");
int bytesReceived = 0;
for (;;)
@@ -168,7 +168,7 @@ size_t tryReadSocket(SocketType socket, void* buffer, size_t bytesToRead) //thro
size_t tryWriteSocket(SocketType socket, const void* buffer, size_t bytesToWrite) //throw SysError; may return short! CONTRACT: bytesToWrite > 0
{
if (bytesToWrite == 0)
- throw std::logic_error("Contract violation! " + std::string(__FILE__) + ':' + numberTo<std::string>(__LINE__));
+ throw std::logic_error(std::string(__FILE__) + '[' + numberTo<std::string>(__LINE__) + "] Contract violation!");
int bytesWritten = 0;
for (;;)
bgstack15