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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Aug 2019 18:05:19 +0000 (14:05 -0400)
commitf33c35fbd629c3148148ae249fcd7e990fe5be4e
tree6c0294e0ce2339814dada7a2fa10799b83c01ff8
parentea8a02882a1306f9e57f5212ae234693773aa23d
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.025819 seconds and 4 git commands to generate.