- Timestamp:
- Jul 31, 2011, 5:15:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/core/command/TclBind.cc
r8788 r8806 106 106 } 107 107 catch (Tcl::tcl_error const &e) 108 { COUT(1) << "Tcl error while creating Tcl-interpreter: " << e.what() << std::endl; }108 { orxout(internal_error, context::tcl) << "Tcl error while creating Tcl-interpreter: " << e.what() << endl; } 109 109 } 110 110 } … … 129 129 } 130 130 catch (Tcl::tcl_error const &e) 131 { COUT(1) << "Tcl error while creating Tcl-interpreter: " << e.what() << std::endl; COUT(1) << "Error: Tcl isn't properly initialized. Orxonox might possibly not work like that." << std::endl; } 131 { 132 orxout(internal_error, context::tcl) << "Tcl error while creating Tcl-interpreter: " << e.what() << endl; 133 orxout(user_error, context::tcl) << "Tcl isn't properly initialized. Orxonox might possibly not work like that." << endl; 134 } 132 135 133 136 return interpreter; … … 154 157 std::string TclBind::tcl_query(Tcl::object const &args) 155 158 { 156 COUT(4) << "Tcl_query: " << args.get() << std::endl;159 orxout(verbose, context::commands) << "Tcl_query: " << args.get() << endl; 157 160 return TclBind::tcl_helper(args, true); 158 161 } … … 163 166 void TclBind::tcl_execute(Tcl::object const &args) 164 167 { 165 COUT(4) << "Tcl_execute: " << args.get() << std::endl;168 orxout(verbose, context::commands) << "Tcl_execute: " << args.get() << endl; 166 169 TclBind::tcl_helper(args, false); 167 170 } … … 186 189 switch (error) 187 190 { 188 case CommandExecutor::Error: COUT(1) << "Error: Can't execute command \"" << command << "\", command doesn't exist. (B)" << std::endl; break;189 case CommandExecutor::Incomplete: COUT(1) << "Error: Can't execute command \"" << command << "\", not enough arguments given. (B)" << std::endl; break;190 case CommandExecutor::Deactivated: COUT(1) << "Error: Can't execute command \"" << command << "\", command is not active. (B)" << std::endl; break;191 case CommandExecutor::Denied: COUT(1) << "Error: Can't execute command \"" << command << "\", access denied. (B)" << std::endl; break;191 case CommandExecutor::Error: orxout(user_error) << "Can't execute command \"" << command << "\", command doesn't exist. (B)" << endl; break; 192 case CommandExecutor::Incomplete: orxout(user_error) << "Can't execute command \"" << command << "\", not enough arguments given. (B)" << endl; break; 193 case CommandExecutor::Deactivated: orxout(user_error) << "Can't execute command \"" << command << "\", command is not active. (B)" << endl; break; 194 case CommandExecutor::Denied: orxout(user_error) << "Can't execute command \"" << command << "\", access denied. (B)" << endl; break; 192 195 } 193 196 194 197 if (error == CommandExecutor::Error) 195 COUT(3) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << std::endl;198 orxout(user_info) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << endl; 196 199 197 200 return result; … … 211 214 } 212 215 catch (Tcl::tcl_error const &e) 213 { COUT(1) << "Tcl error: " << e.what() << std::endl; }216 { orxout(user_error, context::tcl) << "Tcl error: " << e.what() << endl; } 214 217 } 215 218 … … 223 226 void TclBind::bgerror(const std::string& error) 224 227 { 225 COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl;228 orxout(user_error, context::tcl) << "Tcl background error: " << stripEnclosingBraces(error) << endl; 226 229 } 227 230 … … 243 246 } 244 247 catch (Tcl::tcl_error const &e) 245 { COUT(1) << "Tcl error: " << e.what() << std::endl; }248 { orxout(user_error, context::tcl) << "Tcl error: " << e.what() << endl; } 246 249 247 250 if (error)
Note: See TracChangeset
for help on using the changeset viewer.