Changeset 8858 for code/trunk/src/libraries/core/command/TclBind.cc
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/libraries/core/command/TclBind.cc
r8366 r8858 34 34 35 35 #include "SpecialConfig.h" 36 #include "util/ Debug.h"36 #include "util/Output.h" 37 37 #include "util/Exception.h" 38 38 #include "util/StringUtils.h" … … 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 } … … 184 187 error = evaluation.execute(); 185 188 186 switch (error) 187 { 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; 192 } 193 194 if (error == CommandExecutor::Error) 195 COUT(3) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << std::endl; 189 if (error) 190 { 191 orxout(user_error) << "Can't execute command \"" << command << "\", " + CommandExecutor::getErrorDescription(error) + ". (TclBind)" << endl; 192 if (error == CommandExecutor::Inexistent) 193 orxout(user_info) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << endl; 194 } 196 195 197 196 return result; … … 211 210 } 212 211 catch (Tcl::tcl_error const &e) 213 { COUT(1) << "Tcl error: " << e.what() << std::endl; }212 { orxout(user_error, context::tcl) << "Tcl error: " << e.what() << endl; } 214 213 } 215 214 … … 223 222 void TclBind::bgerror(const std::string& error) 224 223 { 225 COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl;224 orxout(user_error, context::tcl) << "Tcl background error: " << stripEnclosingBraces(error) << endl; 226 225 } 227 226 … … 243 242 } 244 243 catch (Tcl::tcl_error const &e) 245 { COUT(1) << "Tcl error: " << e.what() << std::endl; }244 { orxout(user_error, context::tcl) << "Tcl error: " << e.what() << endl; } 246 245 247 246 if (error)
Note: See TracChangeset
for help on using the changeset viewer.