Skip to content

Commit 9b0d20c

Browse files
committed
Include refused timestamp in exception message for easier debugging
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 8d783f9 commit 9b0d20c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frequenz/sdk/timeseries/_ringbuffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def update(self, sample: Sample) -> None:
130130
# Don't add outdated entries
131131
if timestamp < self._datetime_oldest and self._datetime_oldest != datetime.max:
132132
raise IndexError(
133-
f"Timestamp too old (cut-off is at {self._datetime_oldest})."
133+
f"Timestamp {timestamp} too old (cut-off is at {self._datetime_oldest})."
134134
)
135135

136136
# Update timestamps

0 commit comments

Comments
 (0)