MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / formatStackTraceSection

Function formatStackTraceSection

src/Common/Exception.cpp:448–453  ·  view source on GitHub ↗

Formats the trailing ", Stack trace (...)\n\n " section of an exception message. Returns an empty string when there is no stack trace, so that the message never ends with the "always include the lines below" promise without any lines following it.

Source from the content-addressed store, hash-verified

446/// Returns an empty string when there is no stack trace, so that the message never ends with the
447/// "always include the lines below" promise without any lines following it.
448static std::string formatStackTraceSection(const std::string & stack_trace)
449{
450 if (stack_trace.empty())
451 return {};
452 return ", Stack trace (when copying this message, always include the lines below):\n\n" + stack_trace;
453}
454
455std::string getCurrentExceptionMessage(
456 bool with_stacktrace,

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected