mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-03 11:30:22 +00:00
Add a top-level catch-handler for std::string
This commit is contained in:
parent
408f5fe42f
commit
19aadbfb8d
@ -48,7 +48,7 @@ LanguageCardUnit::LanguageCardUnit(SS_CARDTYPE type, UINT slot) :
|
||||
m_uLastRamWrite(0)
|
||||
{
|
||||
if (m_slot != LanguageCardUnit::kSlot0)
|
||||
throw std::string("Card: wrong slot");
|
||||
throw std::string("Language Card: wrong slot"); // throws to the top-level catch-handler, and shuts down
|
||||
|
||||
SetMemMainLanguageCard(NULL, true);
|
||||
}
|
||||
|
@ -577,6 +577,10 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
|
||||
{
|
||||
ExceptionHandler(exception.what());
|
||||
}
|
||||
catch(std::string error)
|
||||
{
|
||||
ExceptionHandler(error.c_str());
|
||||
}
|
||||
|
||||
Shutdown();
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user