some unimportant clean-ups ;)
[senf.git] / Utils / Console / Executor.hh
index 7538eff..9341ded 100644 (file)
@@ -108,16 +108,17 @@ namespace console {
                                         /**< if autocomplete is enabled, path components which can
                                              be uniquely completed will be completed
                                              automatically. Disabled by default (but enabled
-                                             automatically by the interactive console) void
-                                             autocomplete(bool v). */
+                                             automatically by the interactive console). */
 
         Executor & autocomplete(bool v); ///< Set autocomplete status
                                         /**< \see autocomplete() */
 
+
         DirectoryNode & chroot() const; ///< Get root node
                                         /**< The root node defaults to senf::console::root(). If
                                              changed, all path references are relative to this node
                                              and objects outside that tree cannot be accessed. */ 
+
         Executor & chroot(DirectoryNode & node); ///< chroot into given directory
                                         /**< After this call, all path's are interpreted relative to
                                              \a node and only nodes in the tree rooted at \a node
@@ -147,8 +148,17 @@ namespace console {
                                Path & dir);
         std::string complete(DirectoryNode & dir, std::string const & name);
 
-        struct InvalidPathException {};
-        struct InvalidDirectoryException {};
+        struct InvalidPathException {
+            std::string path;
+            InvalidPathException() : path() {}
+            InvalidPathException(std::string path_) : path(path_) {}
+            
+        };
+        struct InvalidDirectoryException {
+            std::string path;
+            InvalidDirectoryException() : path() {}
+            InvalidDirectoryException(std::string path_) : path(path_) {}
+        };
         struct InvalidCommandException {};
         
         DirectoryNode::ptr root_;
@@ -163,6 +173,8 @@ namespace console {
         bool autocomplete_;
     };
 
+    void senf_console_format_value(DirectoryNode::ptr value, std::ostream & os);
+
 }}
 
 ///////////////////////////////hh.e////////////////////////////////////////