string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " > ";
command += logFile;
+ command += " 2>&1";
cerr << command.c_str() << endl;
status = system(command.c_str());
if(status)
- throw EmulationException("Error of connection on remote host");
+ {
+ ifstream error_message(logFile.c_str());
+ std::string mess;
+ std::string temp;
+ while(std::getline(error_message, temp))
+ mess += temp;
+ error_message.close();
+ throw EmulationException("Error of connection on remote host, error was: " + mess);
+ }
// read id of submitted job in log file
ifstream idfile(logFile.c_str());