diff options
author | Jose <jose@zeroc.com> | 2018-07-27 13:55:58 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-07-27 13:55:58 +0200 |
commit | 83b85371785bae2928332ac758f2359b724ef420 (patch) | |
tree | de77474c09aeb5c2038286216578bbc628801734 /cpp/src/IcePatch2/FileServerI.cpp | |
parent | Fix UWP Build failure (diff) | |
download | ice-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.cpp | 7 |
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); |