Commit e5933fa6 authored by chili's avatar chili
Browse files

top level try...catch with messagebox

parent 9b321235
......@@ -26,6 +26,8 @@ int CALLBACK WinMain(
LPSTR lpCmdLine,
int nCmdShow )
{
try
{
Window wnd( 800,300,"Donkey Fart Box" );
MSG msg;
......@@ -45,4 +47,18 @@ int CALLBACK WinMain(
// wParam here is the value passed to PostQuitMessage
return msg.wParam;
}
catch( const ChiliException& e )
{
MessageBox( nullptr,e.what(),e.GetType(),MB_OK | MB_ICONEXCLAMATION );
}
catch( const std::exception& e )
{
MessageBox( nullptr,e.what(),"Standard Exception",MB_OK | MB_ICONEXCLAMATION );
}
catch( ... )
{
MessageBox( nullptr,"No details available","Unknown Exception",MB_OK | MB_ICONEXCLAMATION );
}
return -1;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment