MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / PrintCrashLog

Method PrintCrashLog

src/crashlog.cpp:166–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void CrashLog::PrintCrashLog() const
167{
168 fmt::print(" OpenTTD version:\n");
169 fmt::print(" Version: {}\n", this->survey["info"]["openttd"]["version"]["revision"].get<std::string>());
170 fmt::print(" Hash: {}\n", this->survey["info"]["openttd"]["version"]["hash"].get<std::string>());
171 fmt::print(" NewGRF ver: {}\n", this->survey["info"]["openttd"]["version"]["newgrf"].get<std::string>());
172 fmt::print(" Content ver: {}\n", this->survey["info"]["openttd"]["version"]["content"].get<std::string>());
173 fmt::print("\n");
174
175 fmt::print(" Crash:\n");
176 fmt::print(" Reason: {}\n", this->survey["crash"]["reason"].get<std::string>());
177 fmt::print("\n");
178
179 fmt::print(" Stacktrace:\n");
180 for (const auto &line : this->survey["stacktrace"]) {
181 fmt::print(" {}\n", line.get<std::string>());
182 }
183 fmt::print("\n");
184}
185
186/**
187 * Write the crash log to a file.

Callers 1

MakeCrashLogMethod · 0.95

Calls 1

printFunction · 0.50

Tested by

no test coverage detected