Add basic exception types and throwing facilities
Add two LTTng-specific exception types:
- lttng::ctl::error
- lttng::posix_error
These types are meant to help transition from error code-based
error handling in RAII-safe functions.
lttng::ctl::error wraps `enum lttng_error_code`. It is meant to be
thrown using the `LTTNG_THROW_CTL` macro which samples the throw-site
(file name, function name, line number). This should be used only
in code paths dealing providing the liblttng-ctl interface.
It should, ultimately, be thrown in code that is specific to the
implementation of the various liblttng-ctl commands and not all over the
place since it contains very little information beyond the error code.
lttng::posix_error wraps `errno` values that are used in various places
to report errors involving (mostly) syscalls.
Over time, more specific exception types will be added.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I02e104f28dd8149aee70211b5849f3502f16d58b
This page took 0.026354 seconds and 5 git commands to generate.