string-format: introduce function to format a bt_error
The CLI has a function to format a bt_error nicely. We will want to use
it in the Python bindings too, so move it to the string-format
convenience library. Make it return the formatted string instead of
printing directly to stderr.
I did not try to make this function handle memory allocation errors, as:
1. It's not very likely anyway
2. We are likely in the process of handling an error, I don't think it
would be useful to return an error code. If something fails in this
function, I don't know what else remains to do.
Change-Id: Ia540b95bd9e1aca7899e5fbccfe3fba463457e3c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2433
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.026445 seconds and 4 git commands to generate.