Skip to content

Commit 7dba6c5

Browse files
andjo403michaelwoerister
authored andcommitted
make it clear what events that was involved in the panic
1 parent 2064991 commit 7dba6c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

measureme/src/profiling_data.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ impl<'a> Iterator for MatchingEventsIterator<'a> {
137137
if previous_event.event_kind != event.event_kind
138138
|| previous_event.label != event.label
139139
{
140-
panic!("previous event on thread wasn't the start event");
140+
panic!(
141+
"the event with label: \"{}\" went out of scope of the parent \
142+
event with label: \"{}\"",
143+
previous_event.label, event.label
144+
);
141145
}
142146

143147
return Some(MatchingEvent::StartStop(previous_event, event));

0 commit comments

Comments
 (0)