MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / AppendNestedMessage

Function AppendNestedMessage

src/util/Exception.cxx:40–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39template<typename T>
40static void
41AppendNestedMessage(std::string &result, T &&e,
42 const char *fallback, const char *separator) noexcept
43{
44 try {
45 std::rethrow_if_nested(std::forward<T>(e));
46 } catch (const std::exception &nested) {
47 result += separator;
48 AppendSanitize(result, nested.what());
49 AppendNestedMessage(result, nested, fallback, separator);
50 } catch (const std::nested_exception &ne) {
51 AppendNestedMessage(result, ne, fallback, separator);
52 } catch (const char *s) {
53 result += separator;
54 AppendSanitize(result, s);
55 } catch (...) {
56 result += separator;
57 result += fallback;
58 }
59}
60
61std::string
62GetFullMessage(const std::exception &e,

Callers 1

GetFullMessageFunction · 0.85

Calls 1

AppendSanitizeFunction · 0.85

Tested by

no test coverage detected