Changeset 10327 for trunk


Ignore:
Timestamp:
04/08/11 14:08:45 (14 years ago)
Author:
tbretz
Message:
Switched on the non dim-standard formats for DimCommands; improved the output if the Converter throws an exception.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/ServiceList.cc

    r10306 r10327  
    734734    const string fmt = GetFormat(cmd);
    735735
    736     // Convert the user enetered data according to the format string
     736    // Convert the user entered data according to the format string
    737737    // into a data block which will be attached to the event
    738     lout << kBlue << cmd;
    739 
    740     const Converter conv(lout, fmt);
     738    const Converter conv(lout, fmt, false);
    741739    if (!conv)
    742740    {
     
    747745    try
    748746    {
     747        lout << kBlue << cmd;
    749748        const vector<char> v = conv.GetVector(str.substr(p0));
     749        lout << endl;
    750750
    751751        const int rc = DimClient::sendCommand(cmd.c_str(), (void*)v.data(), v.size());
     
    757757    catch (const std::runtime_error &e)
    758758    {
    759         lout << kRed << e.what() << endl;
     759        lout << endl << kRed << e.what() << endl;
    760760        return false;
    761761    }
  • trunk/FACT++/src/StateMachineImp.cc

    r10314 r10327  
    231231    // Convert the user enetered data according to the format string
    232232    // into a data block which will be attached to the event
    233     lout << kBlue << name;
    234 
    235233    const Converter conv(lout, fmt, false);
    236234    if (!conv)
     
    242240    try
    243241    {
     242        lout << kBlue << name;
    244243        const vector<char> v = conv.GetVector(str.substr(p0));
     244        lout << endl;
     245
    245246        return PostEvent(*evt, v.data(), v.size());
    246247    }
    247248    catch (const std::runtime_error &e)
    248249    {
    249         lout << kRed << e.what() << endl;
     250        lout << endl << kRed << e.what() << endl;
    250251    }
    251252
Note: See TracChangeset for help on using the changeset viewer.