diff --git a/Foundation/src/File_UNIX.cpp b/Foundation/src/File_UNIX.cpp index 96e521c15..28ec8619f 100644 --- a/Foundation/src/File_UNIX.cpp +++ b/Foundation/src/File_UNIX.cpp @@ -15,6 +15,7 @@ #include "Poco/File_UNIX.h" #include "Poco/Buffer.h" #include "Poco/Exception.h" +#include "Poco/Error.h" #include #include #include @@ -526,7 +527,7 @@ void FileImpl::handleLastErrorImpl(const std::string& path) case EMFILE: throw FileException("too many open files", path, errno); default: - throw FileException(std::strerror(errno), path, errno); + throw FileException(Error::getMessage(errno), path, errno); } }