MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / report_fatal_error

Function report_fatal_error

android/src/rpcsx-android.cpp:211–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209void jit_announce(uptr, usz, std::string_view);
210
211[[noreturn]] void report_fatal_error(std::string_view _text,
212 bool is_html = false,
213 bool include_help_text = true) {
214 std::string buf;
215
216 buf = std::string(_text);
217
218 // Check if thread id is in string
219 if (_text.find("\nThread id = "sv) == umax && !thread_ctrl::is_main()) {
220 // Append thread id if it isn't already, except on main thread
221 fmt::append(buf, "\n\nThread id = %u.", thread_ctrl::get_tid());
222 }
223
224 if (!g_tls_serialize_name.empty()) {
225 fmt::append(buf, "\nSerialized Object: %s", g_tls_serialize_name);
226 }
227
228 const system_state state = Emu.GetStatus(false);
229
230 if (state == system_state::stopped) {
231 fmt::append(buf, "\nEmulation is stopped");
232 } else {
233 const std::string &name = Emu.GetTitleAndTitleID();
234 fmt::append(buf, "\nTitle: \"%s\" (emulation is %s)",
235 name.empty() ? "N/A" : name.data(),
236 state == system_state::stopping ? "stopping" : "running");
237 }
238
239 fmt::append(buf, "\nBuild: \"%s\"", rpcs3::get_verbose_version());
240 fmt::append(buf, "\nDate: \"%s\"", std::chrono::system_clock::now());
241
242 __android_log_write(ANDROID_LOG_FATAL, "RPCS3", buf.c_str());
243
244 jit_announce(0, 0, "");
245 rx::breakpoint();
246 std::abort();
247 std::terminate();
248}
249
250void qt_events_aware_op(int repeat_duration_ms,
251 std::function<bool()> wrapped_op) {

Callers 9

ProgressBarSetMsgMethod · 0.85
ProgressBarResetMethod · 0.85
ProgressBarIncMethod · 0.85
ProgressBarSetValueMethod · 0.85
ProgressBarSetLimitMethod · 0.85
throw_fatalFunction · 0.85
Thread.cppFile · 0.85
emergency_exitMethod · 0.85

Calls 10

appendFunction · 0.85
get_verbose_versionFunction · 0.85
GetStatusMethod · 0.80
GetTitleAndTitleIDMethod · 0.80
c_strMethod · 0.80
stringFunction · 0.50
jit_announceFunction · 0.50
findMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected