You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/03/23 20:55:57 UTC

[2/2] mesos git commit: Windows: Fixed usage of WindowsError in stat.hpp.

Windows: Fixed usage of WindowsError in stat.hpp.

This changes two error messages from using `WindowsError` to plain
old `Error`.  Using `WindowsError` gives the false impression
that the error comes from the syscall, rather than from an
invocation of a stout helper.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/82e4077c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/82e4077c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/82e4077c

Branch: refs/heads/master
Commit: 82e4077ceb40e84c2796be43f1448eec0bfd7c69
Parents: 47e04a4
Author: Joseph Wu <jo...@apache.org>
Authored: Thu Mar 23 12:07:17 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu Mar 23 13:53:35 2017 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/os/windows/stat.hpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/82e4077c/3rdparty/stout/include/stout/os/windows/stat.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/windows/stat.hpp b/3rdparty/stout/include/stout/os/windows/stat.hpp
index 38b9fe8..8587341 100644
--- a/3rdparty/stout/include/stout/os/windows/stat.hpp
+++ b/3rdparty/stout/include/stout/os/windows/stat.hpp
@@ -169,9 +169,7 @@ inline Try<dev_t> dev(
   struct _stat s;
 
   if (follow == DO_NOT_FOLLOW_SYMLINK) {
-      return WindowsError(
-          ERROR_NOT_SUPPORTED,
-          "Error invoking stat for '" + path + "'");
+      return Error("Non-following stat not supported for '" + path + "'");
   }
 
   if (::_stat(path.c_str(), &s) < 0) {
@@ -189,9 +187,7 @@ inline Try<ino_t> inode(
   struct _stat s;
 
   if (follow == DO_NOT_FOLLOW_SYMLINK) {
-      return WindowsError(
-          ERROR_NOT_SUPPORTED,
-          "Error invoking stat for '" + path + "'");
+      return Error("Non-following stat not supported for '" + path + "'");
   }
 
   if (::_stat(path.c_str(), &s) < 0) {