Changeset 201 for trunk/src/statistics.cpp
- Timestamp:
- 05/04/2009 09:21:44 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/statistics.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/statistics.cpp
r199 r201 34 34 Statistics::Statistics(configuration::Configuration *backend) 35 35 { 36 try { 37 load_data(); 38 } catch (exception &e) { 39 reset(); 40 } 41 } 42 43 void Statistics::load_data() 44 { 36 45 string tmp; 37 46 vector<string> tmp_vec; … … 46 55 tmp = backend->get("statistics_score_distribution"); 47 56 split(tmp_vec, tmp, is_any_of(",")); 48 if (tmp_vec.size() != score_distributions_slots) { 49 reset(); 50 return; 51 } 57 if (tmp_vec.size() != score_distributions_slots) 58 throw BadConfiguration(); 52 59 53 60 BOOST_FOREACH(string i, tmp_vec) { … … 57 64 istringstream i(tmp); 58 65 i >> _last_reset; 66 if (!_last_reset) 67 throw BadConfiguration(); 68 59 69 } 60 70
Note: See TracChangeset
for help on using the changeset viewer.
