mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Improved fatal errors - they run through crash handler now
This commit is contained in:
parent
9010d8ed47
commit
767ced3563
5 changed files with 48 additions and 30 deletions
|
@ -414,15 +414,9 @@ void Beefy::BFFatalError(const StringImpl& message, const StringImpl& file, int
|
|||
if (gBFApp != NULL)
|
||||
gBFApp->mSysDialogCnt++;
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
OutputDebugStrF("FATAL ERROR: %s\n", message.c_str());
|
||||
_wassert(UTF8Decode(message).c_str(), UTF8Decode(file).c_str(), line);
|
||||
#else
|
||||
String error = StrFormat("%s in %s:%d", message.c_str(), file.c_str(), line);
|
||||
::MessageBoxA(NULL, error.c_str(), "FATAL ERROR", MB_ICONERROR | MB_OK);
|
||||
exit(1);
|
||||
#endif
|
||||
|
||||
String failMsg = StrFormat("%s in %s:%d", message.c_str(), file.c_str(), line);
|
||||
BfpSystem_FatalError(failMsg.c_str(), "FATAL ERROR");
|
||||
|
||||
#ifndef BF_NO_BFAPP
|
||||
if (gBFApp != NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue