summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/FileServerI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-07-27 13:55:58 +0200
committerJose <jose@zeroc.com>2018-07-27 13:55:58 +0200
commit83b85371785bae2928332ac758f2359b724ef420 (patch)
treede77474c09aeb5c2038286216578bbc628801734 /cpp/src/IcePatch2/FileServerI.cpp
parentFix UWP Build failure (diff)
downloadice-83b85371785bae2928332ac758f2359b724ef420.tar.bz2
ice-83b85371785bae2928332ac758f2359b724ef420.tar.xz
ice-83b85371785bae2928332ac758f2359b724ef420.zip
Replace strerror usage with IceUtilInternal::errorToString
Close #154
Diffstat (limited to 'cpp/src/IcePatch2/FileServerI.cpp')
-rw-r--r--cpp/src/IcePatch2/FileServerI.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp
index 36531e93e89..395f27422d8 100644
--- a/cpp/src/IcePatch2/FileServerI.cpp
+++ b/cpp/src/IcePatch2/FileServerI.cpp
@@ -144,7 +144,8 @@ IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Lo
int fd = IceUtilInternal::open(absolutePath, O_RDONLY|O_BINARY);
if(fd == -1)
{
- throw FileAccessException(string("cannot open `") + path + "' for reading: " + strerror(errno));
+ throw FileAccessException(string("cannot open `") + path + "' for reading: " +
+ IceUtilInternal::errorToString(errno));
}
if(!largeFile)
@@ -177,7 +178,7 @@ IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Lo
posStr << pos;
throw FileAccessException("cannot seek position " + posStr.str() + " in file `" + path + "': " +
- strerror(errno));
+ IceUtilInternal::errorToString(errno));
}
buffer.resize(num);
@@ -190,7 +191,7 @@ IcePatch2::FileServerI::getFileCompressedInternal(const std::string& pa, Ice::Lo
#endif
{
IceUtilInternal::close(fd);
- throw FileAccessException("cannot read `" + path + "': " + strerror(errno));
+ throw FileAccessException("cannot read `" + path + "': " + IceUtilInternal::errorToString(errno));
}
IceUtilInternal::close(fd);