From c47de319ccd918caccfc1f3ee394e48f6d4e4dc5 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 29 Jul 2011 20:38:14 -0700 Subject: Bugfix 2823: Configuration mode command interpreter, output adjustments for consistency --- src/cstore/cstore.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/cstore/cstore.cpp') diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp index b8ab82f..5f2eb79 100644 --- a/src/cstore/cstore.cpp +++ b/src/cstore/cstore.cpp @@ -342,7 +342,8 @@ Cstore::validateSetPath(const Cpath& path_comps) * single-value node without value. now all value nodes * (single-value, multi-value, and tag) must be set with value. */ - output_user("The specified configuration node requires a value\n"); + string output = "Configuration path: ["+path_comps.to_string()+"] requires a value\n"; + output_user(output.c_str()); return false; } else { /* typeless node @@ -443,7 +444,8 @@ Cstore::getEditEnv(const Cpath& path_comps, string& env) * follow the original implementation and do a "set". */ if (!validateSetPath(path_comps)) { - output_user("The specified config path is not valid\n"); + string output = "Configuration path: ["+path_comps.to_string()+"] is not valid\n"; + output_user(output.c_str()); return false; } if (!set_cfg_path(path_comps, false)) { @@ -2056,7 +2058,7 @@ Cstore::get_parsed_tmpl(const Cpath& path_comps, bool validate_vals, { tr1::shared_ptr rtmpl; // default error message - error = "The specified configuration node is not valid"; + error = "Configuration path: ["+path_comps.to_string()+"] is not valid\n"; bool do_caching = false; if (tmpl_path_at_root()) { @@ -2491,7 +2493,8 @@ Cstore::set_cfg_path(const Cpath& path_comps, bool output) if (path_exists) { // whole path already exists if (output) { - output_user("The specified configuration node already exists\n"); + string userout = "Configuration path: ["+path_comps.to_string()+"] already exists\n"; + output_user(userout.c_str()); } // treat as success } -- cgit v1.2.3