FACT++  1.0
bool DimServiceInfoList::SendDimCommand ( std::ostream &  lout,
const std::string &  server,
const std::string &  str 
) const

Catches the runtime_erros thrown by SendDimCommand(const string &, string, ostream &) and redirects the error message to the output stream.

Parameters
loutthe ostream to which errors and debug output is redirected
serverThe name of the server to which the command should be send, e.g. DRIVE
strCommand and data, eg "TRACK 12.5 13.8"
Returns
true if SendDimComment didn't throw an exception, false otherwise

Definition at line 719 of file DimServiceInfoList.cc.

References kRed.

Referenced by DimServiceInfoListImp::SendDimCommand(), and ~DimServiceInfoList().

720 {
721  try
722  {
723  SendDimCommand(server, str, lout);
724  //lout << kGreen << "Command emitted successfully to " << server << "." << endl;
725  return true;
726  }
727  catch (const runtime_error &e)
728  {
729  lout << kRed << e.what() << endl;
730  return false;
731  }
732 }
char str[80]
Definition: test_client.c:7
Set color Red.
Definition: WindowLog.h:17
bool SendDimCommand(std::ostream &lout, const std::string &server, const std::string &str) const

+ Here is the caller graph for this function: