Skip to content

Commit b5744e0

Browse files
authored
[OMON-655] Improve error message when dividing by 0 (#315)
1 parent 0d4d2d2 commit b5744e0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ endif()
3131

3232
# Define project
3333
project(Monitoring
34-
VERSION 3.15.2
34+
VERSION 3.15.4
3535
DESCRIPTION "O2 Monitoring library"
3636
LANGUAGES CXX
3737
)

src/DerivedMetrics.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool DerivedMetrics::process(Metric& metric, DerivedMetricMode mode)
8080
int timestampCount = timestampDifference.count();
8181
// disallow dividing by 0
8282
if (timestampCount == 0) {
83-
throw MonitoringException("DerivedMetrics", "Division by 0 when calculating rate for: " + metric.getFirstValue().first);
83+
throw MonitoringException("DerivedMetrics", "Division by 0 when calculating rate for: " + metric.getName() + "/" + metric.getFirstValue().first);
8484
}
8585

8686
auto current = metric.getFirstValue().second;

0 commit comments

Comments
 (0)