Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2011, 7:30:04 PM (13 years ago)
Author:
landauf
Message:

improved error output of CommandExecutor and Tcl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/command/TclBind.cc

    r8806 r8836  
    187187            error = evaluation.execute();
    188188
    189         switch (error)
    190         {
    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;
    195         }
    196 
    197         if (error == CommandExecutor::Error)
    198             orxout(user_info) << "Did you mean \"" << evaluation.getCommandSuggestion() << "\"?" << 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        }
    199195
    200196        return result;
Note: See TracChangeset for help on using the changeset viewer.