Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2011, 7:30:04 PM (14 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/Shell.cc

    r8834 r8836  
    389389        const std::string& result = CommandExecutor::query(this->inputBuffer_->get(), &error);
    390390        if (error)
    391         {
    392             switch (error)
    393             {
    394                 case CommandExecutor::Error:       this->addOutput("Error: Can't execute \"" + this->inputBuffer_->get() + "\", command doesn't exist. (S)", UserError); break;
    395                 case CommandExecutor::Incomplete:  this->addOutput("Error: Can't execute \"" + this->inputBuffer_->get() + "\", not enough arguments given. (S)", UserError); break;
    396                 case CommandExecutor::Deactivated: this->addOutput("Error: Can't execute \"" + this->inputBuffer_->get() + "\", command is not active. (S)", UserError); break;
    397                 case CommandExecutor::Denied:      this->addOutput("Error: Can't execute \"" + this->inputBuffer_->get() + "\", access denied. (S)", UserError); break;
    398             }
    399         }
     391            this->addOutput("Error: Can't execute \"" + this->inputBuffer_->get() + "\", " + CommandExecutor::getErrorDescription(error) + ". (Shell)", UserError);
    400392        else if (result != "")
    401         {
    402393            this->addOutput(result, Result);
    403         }
    404394
    405395        this->clearInput();
Note: See TracChangeset for help on using the changeset viewer.