summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Service.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2008-01-23 09:15:28 -0500
committerBernard Normier <bernard@zeroc.com>2008-01-23 09:15:28 -0500
commit2cdd39227e7efda5fc8b3a04a9c2b0d678943a17 (patch)
treeac7d3ef0ae27a80cc2bc1f4a2c7f42c52d35e979 /cpp/src/Ice/Service.cpp
parentNew VC60 third-party build + VC60 build fixes (diff)
parent- Added IceUtil::SyscallException and cleaned up few IceUtil exceptions (diff)
downloadice-2cdd39227e7efda5fc8b3a04a9c2b0d678943a17.tar.bz2
ice-2cdd39227e7efda5fc8b3a04a9c2b0d678943a17.tar.xz
ice-2cdd39227e7efda5fc8b3a04a9c2b0d678943a17.zip
Merge branch 'master' of ssh://cvs/home/git/ice
Diffstat (limited to 'cpp/src/Ice/Service.cpp')
-rwxr-xr-xcpp/src/Ice/Service.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp
index ed6b2c98a1d..edc357c4620 100755
--- a/cpp/src/Ice/Service.cpp
+++ b/cpp/src/Ice/Service.cpp
@@ -9,6 +9,7 @@
#include <IceUtil/DisableWarnings.h>
#include <IceUtil/CtrlCHandler.h>
+#include <IceUtil/StringUtil.h>
#include <IceUtil/Thread.h>
#include <IceUtil/Monitor.h>
#include <IceUtil/Mutex.h>
@@ -1193,33 +1194,7 @@ Ice::Service::initializeCommunicator(int& argc, char* argv[], const Initializati
void
Ice::Service::syserror(const string& msg)
{
- string errmsg;
-#ifdef _WIN32
- int err = GetLastError();
- if(err < WSABASEERR)
- {
- LPVOID lpMsgBuf = 0;
- DWORD ok = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- 0,
- err,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR)&lpMsgBuf,
- 0,
- 0);
- if(ok)
- {
- LPCTSTR str = (LPCTSTR)lpMsgBuf;
- assert(str && strlen((const char*)str) > 0);
- errmsg = (const char*)str;
- LocalFree(lpMsgBuf);
- }
- }
-#else
- int err = errno;
- errmsg = strerror(err);
-#endif
+ string errmsg = IceUtilInternal::lastErrorToString();
if(_logger)
{
ostringstream ostr;