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.
| 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. |
| 448 | static 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 | |
| 455 | std::string getCurrentExceptionMessage( |
| 456 | bool with_stacktrace, |
no test coverage detected