summaryrefslogtreecommitdiffhomepage
path: root/plugins/statistics/statistics.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-06-06 15:13:39 +0200
committerRoland Reichwein <mail@reichwein.it>2020-06-06 15:13:39 +0200
commit357cf76409d30341a2c4eedcf2568f0abd56e88d (patch)
treeaa9a6121fa9e7827b854ec4c744d60c4f1375e50 /plugins/statistics/statistics.cpp
parentc899a9cb581aa67be94231eba02f432a199512e7 (diff)
More runtime error checking
Diffstat (limited to 'plugins/statistics/statistics.cpp')
-rw-r--r--plugins/statistics/statistics.cpp6
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;