Exception: make source location print-out optional
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 15 May 2024 23:29:55 +0000 (23:29 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jun 2024 15:09:21 +0000 (11:09 -0400)
commit9f4d1ef361e6f02cad87c78f5b1260bc9c3ebc08
tree09d432f1f24d8c9291253539d751caecde4191f3
parent1a496780783cf2f1148e91e0ac6f820ecd6eca3b
Exception: make source location print-out optional

The project-specific exceptions are changed to not include the source location
as part of the exception's message (return of what()) since it is unsuitable in
some contexts (the output of the lttng client for example).

Moreover, the exceptions are modified to provide their own message formatting
instead of relying on the user doing it at the site at which it is thrown since
that formatting is often repetitive. The sites at which the exceptions are
thrown can still augment the exceptions with more context.

The intention of our exceptions is that they still contain the requisite context
to change the print-out based on their members; that context should not be baked
into the message string at the site at which the exception is thrown.

Change-Id: I2733b58d4daf6b9fffc1221c9d03ffef2e246893
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/exception.cpp
src/bin/lttng/exception.hpp
src/common/exception.cpp
src/common/exception.hpp
src/common/random.cpp
src/common/random.hpp
This page took 0.025425 seconds and 4 git commands to generate.