Merge pull request #434 from skl131313/error-msg
Exception with socket error message in getResponse, instead of single… merged-on-behalf-of: Jan Jurzitza <gh@webfreak.org>
This commit is contained in:
commit
4947590b46
|
@ -244,7 +244,7 @@ AutocompleteResponse getResponse(Socket socket)
|
||||||
ubyte[1024 * 24] buffer;
|
ubyte[1024 * 24] buffer;
|
||||||
auto bytesReceived = socket.receive(buffer);
|
auto bytesReceived = socket.receive(buffer);
|
||||||
if (bytesReceived == Socket.ERROR)
|
if (bytesReceived == Socket.ERROR)
|
||||||
throw new Exception("Incorrect number of bytes received");
|
throw new Exception(lastSocketError);
|
||||||
if (bytesReceived == 0)
|
if (bytesReceived == 0)
|
||||||
throw new Exception("Server closed the connection, 0 bytes received");
|
throw new Exception("Server closed the connection, 0 bytes received");
|
||||||
AutocompleteResponse response;
|
AutocompleteResponse response;
|
||||||
|
|
Loading…
Reference in New Issue