[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_context_win.h"
|
||||
|
||||
// Autogenerated by `xb premake`.
|
||||
#include "build/version.h"
|
||||
|
||||
DEFINE_bool(enable_console, false, "Open a console window with the main window",
|
||||
"Logging");
|
||||
|
||||
|
@ -230,16 +233,23 @@ static bool exception_pointers_handler(HostExceptionReport* report) {
|
|||
DWORD64 last_rip = report->ExceptionInfo->ContextRecord->Rip;
|
||||
DWORD except_code = report->ExceptionInfo->ExceptionRecord->ExceptionCode;
|
||||
|
||||
char except_message_buf[256];
|
||||
sprintf_s(except_message_buf,
|
||||
"Exception encountered!\nException address: %s\nStackpointer: "
|
||||
"%s\nInstruction pointer: %s\nExceptionCode: 0x%X (%s)\n",
|
||||
report->GetFormattedAddress(exception_addr),
|
||||
std::string build = (
|
||||
#ifdef XE_BUILD_IS_PR
|
||||
"PR#" XE_BUILD_PR_NUMBER " " XE_BUILD_PR_REPO " " XE_BUILD_PR_BRANCH
|
||||
"@" XE_BUILD_PR_COMMIT_SHORT " against "
|
||||
#endif
|
||||
XE_BUILD_BRANCH "@" XE_BUILD_COMMIT_SHORT " on " XE_BUILD_DATE);
|
||||
|
||||
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_buf);
|
||||
report->AddString(except_message.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue