From 15c5a1f0d3927984b6c5d150127f83747fb135c8 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Wed, 26 Apr 2017 18:26:21 +0100 Subject: AbstractDataPlotter: Improve error message for bad signal def --- trappy/plotter/AbstractDataPlotter.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'trappy') diff --git a/trappy/plotter/AbstractDataPlotter.py b/trappy/plotter/AbstractDataPlotter.py index e4891d8..254709c 100644 --- a/trappy/plotter/AbstractDataPlotter.py +++ b/trappy/plotter/AbstractDataPlotter.py @@ -76,6 +76,11 @@ class AbstractDataPlotter(object): match = re.match(r"(?P[^:]+):(?P[^:]+)(?P:.+)?", signal_def) + if not match: + raise ValueError( + 'Invalid signal definition "{}". ' + 'Should have the form "trace_class:column" ' + 'e.g. "cpu_frequency:frequency"'.format(signal_def)) event = match.group("event") column = match.group("column") color_match = match.group("color") -- cgit v1.2.3