The constructor must fail in the case when the event is not found on the system. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> --- tracecruncher/ft_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tracecruncher/ft_utils.py b/tracecruncher/ft_utils.py index 1fc0648..b5f031a 100644 --- a/tracecruncher/ft_utils.py +++ b/tracecruncher/ft_utils.py @@ -46,6 +46,8 @@ class event: self.instance_list = [] if static: self.evt_id = find_event_id(system, name) + if self.evt_id < 0: + raise ValueError('Faild to find event {0}/{1}'.format(system, name)) else: self.evt_id = -1 -- 2.30.2