#else
#include <netdb.h>
#endif
+#include <msp/core/systemerror.h>
#include <msp/strings/format.h>
#include "socket.h"
#include "resolve.h"
}
else
#ifdef WIN32
- throw Exception(format("Can't resolve '%s': %d", host, err));
+ throw system_error("getaddrinfo", WSAGetLastError());
#else
- throw Exception(format("Can't resolve '%s': %s", host, gai_strerror(err)));
+ throw system_error("getaddrinfo", gai_strerror(err));
#endif
}