diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-06-06 15:13:39 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-06-06 15:13:39 +0200 |
commit | 357cf76409d30341a2c4eedcf2568f0abd56e88d (patch) | |
tree | aa9a6121fa9e7827b854ec4c744d60c4f1375e50 /plugins/statistics | |
parent | c899a9cb581aa67be94231eba02f432a199512e7 (diff) |
More runtime error checking
Diffstat (limited to 'plugins/statistics')
-rw-r--r-- | plugins/statistics/statistics.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/statistics/statistics.cpp b/plugins/statistics/statistics.cpp index 3ebd301..b1778f7 100644 --- a/plugins/statistics/statistics.cpp +++ b/plugins/statistics/statistics.cpp @@ -44,7 +44,11 @@ namespace { return 0; } - result += stoull(elements[column]); + try { + result += stoull(elements[column]); + } catch(...) { + std::cerr << "Error: Stats value " << elements[column] << " malformed." << std::endl; + } } return result; |