Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
e5933fa6
Commit
e5933fa6
authored
Dec 09, 2018
by
chili
Browse files
top level try...catch with messagebox
parent
9b321235
Changes
1
Show whitespace changes
Inline
Side-by-side
hw3d/WinMain.cpp
View file @
e5933fa6
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment