diff options
Diffstat (limited to 'cpp/src/IcePack/IcePackNode.cpp')
-rw-r--r-- | cpp/src/IcePack/IcePackNode.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cpp/src/IcePack/IcePackNode.cpp b/cpp/src/IcePack/IcePackNode.cpp index 45ff530b406..c6673a2c474 100644 --- a/cpp/src/IcePack/IcePackNode.cpp +++ b/cpp/src/IcePack/IcePackNode.cpp @@ -240,15 +240,23 @@ IcePack::NodeService::start(int argc, char* argv[]) struct _stat filestat; if(::_stat(dataPath.c_str(), &filestat) != 0 || !S_ISDIR(filestat.st_mode)) { - error("property `IcePack.Node.Data' is not set to a valid directory path"); - return false; + ostringstream os; + SyscallException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + os << ex; + error("property `IcePack.Node.Data' is set to an invalid path:\n" + os.str()); + return false; } #else struct stat filestat; if(::stat(dataPath.c_str(), &filestat) != 0 || !S_ISDIR(filestat.st_mode)) { - error("property `IcePack.Node.Data' is not set to a valid directory path"); - return false; + ostringstream os; + SyscallException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + os << ex; + error("property `IcePack.Node.Data' is set to an invalid path:\n" + os.str()); + return false; } #endif |