diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-08-23 18:04:34 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:22:15 +0300 |
commit | 9af993a4861033353f2c7ca2de7f9108f391a6fb (patch) | |
tree | 188888517e876fd2f667555eebc47ba84d511e77 /generator/statistics.cpp | |
parent | 8eeb836b6075584743c2fbb227911f41228a4da2 (diff) |
[generator_tool] -calc_statistics works even if some section is missing in the mwm file
Diffstat (limited to 'generator/statistics.cpp')
-rw-r--r-- | generator/statistics.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/generator/statistics.cpp b/generator/statistics.cpp index ba386c5e2e..2af867fe7d 100644 --- a/generator/statistics.cpp +++ b/generator/statistics.cpp @@ -9,6 +9,7 @@ #include "../base/string_utils.hpp" #include "../std/iostream.hpp" +#include "../std/iomanip.hpp" #include "../base/start_mem_debug.hpp" @@ -36,7 +37,17 @@ namespace stats tags.push_back(SEARCH_INDEX_FILE_TAG); for (size_t i = 0; i < tags.size(); ++i) - cout << tags[i] << " : " << cont.GetReader(tags[i]).Size() << endl; + { + cout << setw(7) << tags[i] << " : "; + try + { + cout << cont.GetReader(tags[i]).Size() << endl; + } + catch (Reader::Exception const &) + { + cout << '-' << endl; + } + } } class AccumulateStatistic |