-
Notifications
You must be signed in to change notification settings - Fork 0
/
GTPMException.cpp
55 lines (38 loc) · 1.17 KB
/
GTPMException.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// GTakPM
// (c) Benjamin Stein 1994
// All Rights Reserved
// GTPMException.cpp
#include <GTakPM.hpp>
// default exception class
// the error message is retrieved from the application resources
// assume non-fatal error
// these exceptions are caught by the catch-blocks in OXApp::run
GTPMException::GTPMException(const ULONG errResource,
const ULONG severity)
: OPMException(errResource, 0, severity)
{}
GTPMException::~GTPMException()
{}
// implementation of system exception handling
SystemHandler::SystemHandler()
: OXcptPM(FALSE)
{}
SystemHandler::~SystemHandler()
{}
BOOL SystemHandler::killTrace()
{
OMsgs msg;
OString Title(30);
OString Question(100);
msg.loadString(APP_TITLE, 30, Title.text);
msg.loadString(SURE_TO_EXIT, 100, Question.text);
if (WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, Question.text, Title.text,
GTPM_ICO, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON1)==MBID_YES)
WinPostMsg(NULLHANDLE, WM_QUIT, (MPARAM)0, (MPARAM)100);
return(TRUE); // continue by default
}
BOOL SystemHandler::trapTrace()
{
return(FALSE); // abort after viewing the exception message
}
// end of source