From 83b85371785bae2928332ac758f2359b724ef420 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 27 Jul 2018 13:55:58 +0200 Subject: Replace strerror usage with IceUtilInternal::errorToString Close #154 --- cpp/src/slice2html/Gen.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cpp/src/slice2html/Gen.cpp') diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 17340acd502..3a4f1e54314 100644 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -7,7 +7,6 @@ // // ********************************************************************** -#include #include #include #include @@ -1254,7 +1253,7 @@ Slice::GeneratorBase::openStream(const string& path) if(!_out.isOpen()) { ostringstream os; - os << "cannot open file `" << path << "': " << strerror(errno); + os << "cannot open file `" << path << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } FileTracker::instance()->addFile(path); @@ -1575,7 +1574,7 @@ Slice::GeneratorBase::makeDir(const string& dir) if(IceUtilInternal::mkdir(dir, 0777) != 0) { ostringstream os; - os << "cannot create directory `" << dir << "': " << strerror(errno); + os << "cannot create directory `" << dir << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } FileTracker::instance()->addDirectory(dir); @@ -1588,7 +1587,7 @@ Slice::GeneratorBase::readFile(const string& file) if(!in) { ostringstream os; - os << "cannot open file `" << file << "': " << strerror(errno); + os << "cannot open file `" << file << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } @@ -1662,7 +1661,7 @@ Slice::GeneratorBase::readFile(const string& file, string& part1, string& part2) if(!in) { ostringstream os; - os << "cannot open file `" << file << "': " << strerror(errno); + os << "cannot open file `" << file << "': " << IceUtilInternal::errorToString(errno); throw FileException(__FILE__, __LINE__, os.str()); } -- cgit v1.2.3