main: Add unhandled exception debug information

In general destructors should not throw exceptions because they are
possibly already being run during stack unwind from a previous
exception.  In those situations the process will terminate with no
opportunity for gracefully handling errors.

For the more typical case of primary exceptions during deconstruction,
the exceptions coming out of sendIntrospectionCompleteSignal are
unknown, so catch them, log them, and then terminate the process.  Over
time as the errors coming out of sendIntrospectionCompleteSignal are
discovered, those errors can be added to a set of expected errors that
need not terminate the process.

In the end, the behavior is only moderately changed - prior to this
patch this exception would already propagate and the application
terminate.  The new behavior here is simply to make a note that it
occurred, and to provide some guidance (this message) to whoever gets
the bug when sendIntrospectionCompleteSignal inevitably does fail and
throw an error.

Also, this makes clang happy (bugprone-exception-escape).

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I67c11c732b3179afcf7174b6f09025083000b85b
1 file changed
tree: 56af572633ecdd0d3187d7bdbc02fbf68d08d578
  1. fail-monitor/
  2. libmapper/
  3. src/
  4. subprojects/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. MAINTAINERS
  9. meson.build
  10. meson_options.txt
  11. OWNERS
  12. README.md
README.md

Prerequisites

Non-OpenBMC build dependencies are:

  • meson/ninja
  • boost
  • libsystemd
  • systemd
  • tinyxml2

Build

meson build && ninja -C build

Run Unit Tests

meson build && ninja -C build test

Clean the repository

rm -rf build