win32: Do not throw exceptions from WinMain

Nicolas Hake 2011-01-02 03:50:06 +01:00
parent 672cc97d2b
commit e049254e95
1 changed files with 6 additions and 1 deletions

View File

@ -88,7 +88,12 @@ int WINAPI WinMain (HINSTANCE hInst,
int argc = 0;
LPWSTR *wargv = CommandLineToArgvW(GetCommandLineW(), &argc);
if (!wargv)
throw std::runtime_error("Unable to split command line");
{
const char *error = "Internal error: Unable to split command line! Exiting.";
Log(error);
Application.MessageDialog(error);
return C4XRV_Failure;
}
argv.reserve(argc);
// Convert args to UTF-8