~lttng/babeltrace/trunk

Viewing all changes in revision 3645.

  • Committer: Philippe Proulx
  • Author(s): Simon Marchi
  • Date: 2019-08-17 05:31:37 UTC
  • Revision ID: git-v1:561e7049fde1116fb0b25d902b8c158b309c8070
bt2: don't show warning when query method raises a non-error exception

I noticed that when a Python query raised bt2.UnknownObject, we show
this warning:

        W BT2-PY component_class_query@native_bt_component_class.i.h:802 Failed to call Python class's _bt_query_from_native() method: py-cls-addr=0x6190001090a0

In my opinion, a query returning "unknown object" is part of the normal
course of operation, and we should not show a warning.  So, only show it
when the exception gets translated to a status < 0.  Also, append an
error cause while at it in case of error.

Change-Id: I079f67b74df881ab000c6e223667ca72dcd52713
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1952
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: