You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/10/10 01:59:35 UTC
svn commit: r1396419 -
/incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp
Author: benh
Date: Tue Oct 9 23:59:35 2012
New Revision: 1396419
URL: http://svn.apache.org/viewvc?rev=1396419&view=rev
Log:
Updated os::realpath to include the strerror(errno) in the
Try::error() (contributed by Ben Mahler,
https://reviews.apache.org/r/7227).
Modified:
incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp
Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp?rev=1396419&r1=1396418&r2=1396419&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp Tue Oct 9 23:59:35 2012
@@ -352,9 +352,9 @@ inline Try<std::string> realpath(const s
{
char temp[PATH_MAX];
if (::realpath(path.c_str(), temp) == NULL) {
- // TODO(benh): Include strerror(errno).
return Try<std::string>::error(
- "Failed to canonicalize " + path + " into an absolute path");
+ "Failed to canonicalize '" + path + "' into an absolute path: "
+ + strerror(errno));
}
return std::string(temp);
}
@@ -421,7 +421,7 @@ inline Try<Nothing> mkdir(const std::str
path += token;
if (::mkdir(path.c_str(), 0755) < 0 && errno != EEXIST) {
return Try<Nothing>::error(
- std::string("Failed to mkdir: ") + strerror(errno));
+ "Failed to mkdir: '" + path + "': " + strerror(errno));
}
path += "/";
}