Changeset 10492


Ignore:
Timestamp:
Apr 29, 2011, 12:47:23 PM (8 years ago)
Author:
tbretz
Message:
Return more info about statet which were not found in GetState.
File:
1 edited

Legend:

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

    r10429 r10492  
    437437//!
    438438//! @returns
    439 //!     The State object containing the description. If teh server was
     439//!     The State object containing the description. If the server was
    440440//!     not found the State object will contain the index -3, if the
    441441//!     state was not found -2.
     
    445445    const ServiceList::const_iterator s = fServiceList.find(server);
    446446    if (s==fServiceList.end())
    447         return State(-3, "", "");
     447    {
     448        stringstream str;
     449        str << "DimServiceInfoList::GetState: Searching for state #" << state << " server " << server << " not found.";
     450        return State(-3, "Server not found", str.str());
     451    }
    448452
    449453    const std::vector<State> &v = s->second.third;
     
    453457            return *i;
    454458
    455     return State(-2, "", "");
     459    stringstream str;
     460    str << "DimServiceInfoList::GetState: State #" << state << " not found on server " << server << ".";
     461    return State(-2, "State not found", str.str());
    456462}
    457463
Note: See TracChangeset for help on using the changeset viewer.