bt2: remove NonexistentClockSnapshot exception type
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 24 Jul 2019 02:38:20 +0000 (22:38 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Aug 2019 18:05:19 +0000 (14:05 -0400)
commit8b18e5b9b4bd112b3a88dd438f73959cb92035a7
treec0187e6c01e9eb25b78655734ac5a5b2eb4641ab
parent614743a5d5d7e661bf95abda9d81468c1d67c030
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.02611 seconds and 4 git commands to generate.