mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
We still have some issues preventing even data_file_test from depending on the world: 1. `options` transitively depends on everything because of the change handlers. 2. `sound` depends on `monster` via `sgbSaveSoundOn` and `monster` depends on `sound` via `gbSoundOn`.
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
#include <iostream>
|
|
#include <string_view>
|
|
|
|
namespace devilution {
|
|
|
|
[[noreturn]] void DisplayFatalErrorAndExit(std::string_view title, std::string_view body)
|
|
{
|
|
std::cerr << "fatal error: " << title << "\n"
|
|
<< body << std::endl;
|
|
std::abort();
|
|
}
|
|
|
|
[[noreturn]] void app_fatal(std::string_view str)
|
|
{
|
|
std::cerr << "app_fatal: " << str << std::endl;
|
|
std::abort();
|
|
}
|
|
|
|
[[noreturn]] void ErrDlg(const char *title, std::string_view error, std::string_view logFilePath, int logLineNr)
|
|
{
|
|
std::cerr << "ErrDlg: " << title << "\n"
|
|
<< error << "\n"
|
|
<< logFilePath << ":" << logLineNr << std::endl;
|
|
std::abort();
|
|
}
|
|
|
|
[[noreturn]] void assert_fail(int nLineNo, const char *pszFile, const char *pszFail)
|
|
{
|
|
std::cerr << "assert_fail: " << pszFile << ":" << nLineNo << "\n"
|
|
<< pszFail << std::endl;
|
|
std::abort();
|
|
}
|
|
|
|
[[noreturn]] void InsertCDDlg(std::string_view archiveName)
|
|
{
|
|
std::cerr << "InsertCDDlg error: " << archiveName << std::endl;
|
|
std::abort();
|
|
}
|
|
|
|
} // namespace devilution
|