py-common: make bt_py_common_format_exception accept an arbitrary exception
authorSimon Marchi <simon.marchi@efficios.com>
Sun, 21 Jul 2019 16:49:05 +0000 (12:49 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 24 Jul 2019 04:18:54 +0000 (00:18 -0400)
commitcacd0713f087e93cdb4c58d5d303ff473df8803e
tree35ba622097ab94c51f73e255fd383e5f4b2a3747
parent69937bc8f642ad9aed4e99f902638e0329c7eb7c
py-common: make bt_py_common_format_exception accept an arbitrary exception

A following patch will need to format each exception of the exception
chain independently.  It will therefore need a function like
bt_py_common_format_exception, but that:

- takes the exception to format as a parameter, rather than relying on
  the Python error indicator
- has an option for formatting just that exception, not following the
  causes chain

This patch changes bt_py_common_format_exception to meet these
requirements.  The behavior of the old bt_py_common_format_exception is
now offered by bt_py_common_format_current_exception, so the existing
callers are updated to use that one.

Change-Id: I7bbb442bc1dc363e5441b3b11ed6f0c6e213ba79
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1737
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/bindings/python/bt2/bt2/native_bt_component_class.i
src/py-common/py-common.c
src/py-common/py-common.h
src/python-plugin-provider/python-plugin-provider.c
This page took 0.024655 seconds and 4 git commands to generate.