aboutsummaryrefslogtreecommitdiff
path: root/trappy
diff options
context:
space:
mode:
authorBrendan Jackman <brendan.jackman@arm.com>2017-04-26 18:26:21 +0100
committerBrendan Jackman <brendan.jackman@arm.com>2017-04-26 18:26:21 +0100
commit15c5a1f0d3927984b6c5d150127f83747fb135c8 (patch)
tree13d234c0a1585a5a2515ca0c1667f7577316e5b2 /trappy
parent3e3ba734d077b116ecf912a51d3428ca6e8ae329 (diff)
downloadtrappy-15c5a1f0d3927984b6c5d150127f83747fb135c8.tar.gz
AbstractDataPlotter: Improve error message for bad signal def
Diffstat (limited to 'trappy')
-rw-r--r--trappy/plotter/AbstractDataPlotter.py5
1 files changed, 5 insertions, 0 deletions
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<event>[^:]+):(?P<column>[^:]+)(?P<color>:.+)?",
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")