Skip to content

stats/grammar: Raise helpful error when asked to parse absent events

Darryl Green requested to merge github/fork/bjackman/grammar-absent-events into master

Created by: bjackman

If you use the Parser to access events that Trappy understands, but that are not present in the trace, you currently get an inscrutable exception when trying to access .loc[ self._window[0]:] on the empty DataFrame in _get_data_frame.

Ideally attempting to parse absent events would just return an empty DataFrame, but then we don't know what columns it should have. So instead let's just raise a more helpful error saying that the event is not present.

Merge request reports