bt2: remove NonexistentClockSnapshot exception type
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 24 Jul 2019 02:38:20 +0000 (22:38 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 24 Jul 2019 04:18:54 +0000 (00:18 -0400)
commit1153eccbbc9fcacffeffd3d39556f250f12bce00
treecf4cc307ef2cc517ed811234abae482ca1451a3d
parent694c792bc8f078c02acde68a3390acafbb36b2f4
bt2: remove NonexistentClockSnapshot exception type

The NonexistentClockSnapshot exception type is used when trying to get a
clock snapshot from an object that doesn't have clock snapshots (because
of the way it's configured).  It does not have much value over using a
standard exception type.  Replace it with ValueError.

In the test add some validation about the error message, because it
would be possible for the test to be a false positive if some ValueError
is raised for another reason (a programming error on our part, for
example).

Change-Id: Iebf86bc53e578407bb60f2145246dbd110cafaac
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1753
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/__init__.py.in
src/bindings/python/bt2/bt2/message.py
tests/bindings/python/bt2/test_event.py
tests/bindings/python/bt2/test_message.py
This page took 0.025024 seconds and 4 git commands to generate.