MCPcopy Create free account
hub / github.com/dobin/RedEdr / prettify_stacktrace

Function prettify_stacktrace

RedEdrShared/loguru.cpp:1189–1208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1187 }
1188
1189 std::string prettify_stacktrace(const std::string & input)
1190 {
1191 std::string output = input;
1192
1193 do_replacements(s_user_stack_cleanups, output);
1194 do_replacements(REPLACE_LIST, output);
1195
1196 try {
1197 std::regex std_allocator_re(R"(,\s*std::allocator<[^<>]+>)");
1198 output = std::regex_replace(output, std_allocator_re, std::string(""));
1199
1200 std::regex template_spaces_re(R"(<\s*([^<> ]+)\s*>)");
1201 output = std::regex_replace(output, template_spaces_re, std::string("<$1>"));
1202 }
1203 catch (std::regex_error&) {
1204 // Probably old GCC.
1205 }
1206
1207 return output;
1208 }
1209
1210 std::string stacktrace_as_stdstring(int skip)
1211 {

Callers 1

stacktrace_as_stdstringFunction · 0.85

Calls 2

do_replacementsFunction · 0.85
stringFunction · 0.85

Tested by

no test coverage detected