#include <boost/preprocessor/stringize.hpp>
#include <senf/Utils/senfassert.hh>
#include <senf/Utils/Range.hh>
-#include <senf/Utils/String.hh>
-#include <senf/Utils/range.hh>
#include "Server.hh"
//#include "Executor.mpp"
prefix_ senf::console::GenericNode &
senf::console::Executor::getNode(ParseCommandInfo const & command)
{
- return traverseNode(command.commandPath());
+ try {
+ return traverseNode(command.commandPath());
+ }
+ catch (InvalidPathException & ex) {
+ throw SyntaxErrorException("invalid path") << " '" << ex.path << "'";
+ }
+ catch (InvalidDirectoryException & ex) {
+ throw SyntaxErrorException("invalid directory") << " '" << ex.path << "'";
+ }
}
prefix_ void senf::console::Executor::exec(std::ostream & output,