Host: Add ReportFatalError()

This commit is contained in:
Stenzek
2024-02-25 18:19:54 +10:00
parent 18ba2032ad
commit 9ac9fc0a1e
4 changed files with 46 additions and 1 deletions

View File

@ -17,6 +17,7 @@
#include "common/assert.h"
#include "common/crash_handler.h"
#include "common/error.h"
#include "common/file_system.h"
#include "common/log.h"
#include "common/memory_settings_interface.h"
@ -114,6 +115,12 @@ bool RegTestHost::InitializeConfig()
return true;
}
void Host::ReportFatalError(const std::string_view& title, const std::string_view& message)
{
Log_ErrorPrintf("ReportFatalError: %.*s", static_cast<int>(message.size()), message.data());
abort();
}
void Host::ReportErrorAsync(const std::string_view& title, const std::string_view& message)
{
if (!title.empty() && !message.empty())