MCPcopy Create free account
hub / github.com/crashfort/SourceDemoRender / Print

Method Print

Projects/Shared/Source/Error.cpp:15–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15void SDR::Error::Print(const Exception& error)
16{
17 auto showstack = !ContextStack.empty();
18
19 if (showstack)
20 {
21 auto tabsize = 4;
22 std::string tabs;
23
24 for (const auto& str : ContextStack)
25 {
26 Log::Warning("%s\"%s\"\n%s{\n", tabs.c_str(), str.c_str(), tabs.c_str());
27 tabs.append(tabsize, ' ');
28 }
29
30 Log::Warning("%s%s\n", tabs.c_str(), error.Description.c_str());
31
32 for (const auto& str : ContextStack)
33 {
34 tabs.resize(tabs.size() - tabsize);
35 Log::Warning("%s}\n", tabs.c_str());
36 }
37 }
38
39 else
40 {
41 Log::Warning(PrintFormat, error.Description.c_str());
42 }
43}
44
45SDR::Error::ScopedContext::ScopedContext(std::string&& str)
46{

Callers

nothing calls this directly

Calls 1

WarningFunction · 0.85

Tested by

no test coverage detected