Windows: Don't call abort, use RaiseException directly
This commit is contained in:
@@ -158,6 +158,11 @@ void ShowOSErrorBox(const char *buf, bool system)
|
||||
}
|
||||
}
|
||||
|
||||
void DoOSAbort()
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
void OSOpenBrowser(const char *url)
|
||||
{
|
||||
[ [ NSWorkspace sharedWorkspace ] openURL:[ NSURL URLWithString:[ NSString stringWithUTF8String:url ] ] ];
|
||||
|
@@ -170,6 +170,11 @@ void ShowOSErrorBox(const char *buf, bool system)
|
||||
WinTerminate(hab);
|
||||
}
|
||||
|
||||
void DoOSAbort()
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
int CDECL main(int argc, char *argv[])
|
||||
{
|
||||
SetRandomSeed(time(nullptr));
|
||||
|
@@ -233,6 +233,11 @@ void ShowOSErrorBox(const char *buf, bool system)
|
||||
fprintf(stderr, "Error: %s\n", buf);
|
||||
}
|
||||
}
|
||||
|
||||
void NORETURN DoOSAbort()
|
||||
{
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_COCOA
|
||||
|
@@ -86,6 +86,11 @@ void ShowOSErrorBox(const char *buf, bool system)
|
||||
MessageBox(GetActiveWindow(), OTTD2FS(buf).c_str(), L"Error!", MB_ICONSTOP | MB_TASKMODAL);
|
||||
}
|
||||
|
||||
void NORETURN DoOSAbort()
|
||||
{
|
||||
RaiseException(0xE1212012, 0, 0, nullptr);
|
||||
}
|
||||
|
||||
void OSOpenBrowser(const char *url)
|
||||
{
|
||||
ShellExecute(GetActiveWindow(), L"open", OTTD2FS(url).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
|
||||
|
Reference in New Issue
Block a user