[UI] Added build to exception message
This commit is contained in:
parent
3d3810fa98
commit
333d7c2767
|
@ -17,6 +17,9 @@
|
||||||
#include "xenia/ui/windowed_app.h"
|
#include "xenia/ui/windowed_app.h"
|
||||||
#include "xenia/ui/windowed_app_context_win.h"
|
#include "xenia/ui/windowed_app_context_win.h"
|
||||||
|
|
||||||
|
// Autogenerated by `xb premake`.
|
||||||
|
#include "build/version.h"
|
||||||
|
|
||||||
DEFINE_bool(enable_console, false, "Open a console window with the main window",
|
DEFINE_bool(enable_console, false, "Open a console window with the main window",
|
||||||
"Logging");
|
"Logging");
|
||||||
|
|
||||||
|
@ -230,16 +233,23 @@ static bool exception_pointers_handler(HostExceptionReport* report) {
|
||||||
DWORD64 last_rip = report->ExceptionInfo->ContextRecord->Rip;
|
DWORD64 last_rip = report->ExceptionInfo->ContextRecord->Rip;
|
||||||
DWORD except_code = report->ExceptionInfo->ExceptionRecord->ExceptionCode;
|
DWORD except_code = report->ExceptionInfo->ExceptionRecord->ExceptionCode;
|
||||||
|
|
||||||
char except_message_buf[256];
|
std::string build = (
|
||||||
sprintf_s(except_message_buf,
|
#ifdef XE_BUILD_IS_PR
|
||||||
"Exception encountered!\nException address: %s\nStackpointer: "
|
"PR#" XE_BUILD_PR_NUMBER " " XE_BUILD_PR_REPO " " XE_BUILD_PR_BRANCH
|
||||||
"%s\nInstruction pointer: %s\nExceptionCode: 0x%X (%s)\n",
|
"@" XE_BUILD_PR_COMMIT_SHORT " against "
|
||||||
report->GetFormattedAddress(exception_addr),
|
#endif
|
||||||
report->GetFormattedAddress(last_stackpointer),
|
XE_BUILD_BRANCH "@" XE_BUILD_COMMIT_SHORT " on " XE_BUILD_DATE);
|
||||||
report->GetFormattedAddress(last_rip), except_code,
|
|
||||||
HostExceptionReport::ChompNewlines(Ntstatus_msg(except_code)));
|
|
||||||
|
|
||||||
report->AddString(except_message_buf);
|
const std::string except_message = fmt::format(
|
||||||
|
"Exception encountered!\nBuild: {}\nException address: "
|
||||||
|
"{}\nStackpointer: "
|
||||||
|
"{}\nInstruction pointer: {}\nExceptionCode: 0x{} ({})\n",
|
||||||
|
build.c_str(), report->GetFormattedAddress(exception_addr),
|
||||||
|
report->GetFormattedAddress(last_stackpointer),
|
||||||
|
report->GetFormattedAddress(last_rip), except_code,
|
||||||
|
HostExceptionReport::ChompNewlines(Ntstatus_msg(except_code)));
|
||||||
|
|
||||||
|
report->AddString(except_message.c_str());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue