Changeset 10289 for trunk/FACT++/src/StateMachineImp.cc
- Timestamp:
- 04/05/11 12:08:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineImp.cc
r10273 r10289 234 234 235 235 const Converter conv(lout, fmt, false); 236 237 const vector<char> v = conv.GetVector(str.substr(p0)); 238 if (!conv.valid() || v.empty()!=conv.empty()) 239 { 240 lout << kRed << "Couldn't properly parse the input... ignored." << endl; 236 if (!conv) 237 { 238 lout << kRed << "Couldn't properly parse the format... ignored." << endl; 241 239 return false; 242 240 } 243 241 244 return PostEvent(*evt, v.data(), v.size()); 245 /* 246 const Converter c(lout, fmt, str.substr(p0)); 247 248 // Parsing was not successfull 249 if (!c.GetRc()) 250 { 251 lout << kRed << "Couldn't properly parse the input... ignored." << endl; 252 return false; 253 } 254 255 return PostEvent(*evt, c.Ptr(), c.Size()); 256 */ 242 try 243 { 244 const vector<char> v = conv.GetVector(str.substr(p0)); 245 return PostEvent(*evt, v.data(), v.size()); 246 } 247 catch (const std::runtime_error &e) 248 { 249 lout << kRed << e.what() << endl; 250 } 251 252 return false; 257 253 } 258 254
Note:
See TracChangeset
for help on using the changeset viewer.