Utils: (membind) Fix weird casting error when binding base-class members
[senf.git] / Utils / Console / Executor.cc
index e464906..3bfa19b 100644 (file)
@@ -299,9 +299,7 @@ senf::console::Executor::traverseNode(ParseCommandInfo::TokensRange const & path
     catch (UnknownNodeNameException &) {
         throw InvalidPathException(
             senf::stringJoin(
-                senf::make_transform_range(
-                    boost::make_iterator_range(path.begin(), path.end()),
-                    boost::bind(&Token::value, _1)),
+                senf::make_transform_range(path, boost::bind(&Token::value, _1)),
                 "/"));
     }
 }
@@ -340,10 +338,10 @@ senf::console::Executor::traverseDirectory(ParseCommandInfo::TokensRange const &
         }
     }
     catch (std::bad_cast &) {
-        throw InvalidDirectoryException();
+        throw InvalidDirectoryException(errorPath);
     }
     catch (UnknownNodeNameException &) {
-        throw InvalidDirectoryException();
+        throw InvalidDirectoryException(errorPath);
     }
 }